/* 16-bit Windows Selection processing for emacs on MS-Windows
-Copyright (C) 1996-1997, 2001-2012 Free Software Foundation, Inc.
+Copyright (C) 1996-1997, 2001-2013 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include <dpmi.h>
#include <go32.h>
#include <sys/farptr.h>
-#include <setjmp.h>
#include "lisp.h"
#include "dispextern.h" /* frame.h seems to want this */
#include "frame.h" /* Need this to get the X window of selected_frame */
#include "blockinput.h"
-#include "buffer.h"
#include "character.h"
+#include "buffer.h"
#include "coding.h"
#include "composite.h"
if ( !FRAME_MSDOS_P (XFRAME (frame)))
goto done;
- BLOCK_INPUT;
+ block_input ();
if (!open_clipboard ())
goto error;
setup_coding_system (Fcheck_coding_system (coding_system), &coding);
coding.dst_bytes = nbytes * 4;
- coding.destination = (unsigned char *) xmalloc (coding.dst_bytes);
+ coding.destination = xmalloc (coding.dst_bytes);
Vnext_selection_coding_system = Qnil;
coding.mode |= CODING_MODE_LAST_BLOCK;
dst = coding.destination;
unblock:
xfree (dst);
- UNBLOCK_INPUT;
+ unblock_input ();
/* Notify user if the text is too large to fit into DOS memory.
(This will happen somewhere after 600K bytes (470K in DJGPP v1.x),
if ( !FRAME_MSDOS_P (XFRAME (frame)))
goto done;
- BLOCK_INPUT;
+ block_input ();
if (!open_clipboard ())
goto unblock;
if ((data_size = get_clipboard_data_size (CF_OEMTEXT)) == 0 ||
- (htext = (unsigned char *)xmalloc (data_size)) == 0)
+ (htext = xmalloc (data_size)) == 0)
goto closeclip;
/* need to know final size after '\r' chars are removed because
close_clipboard ();
unblock:
- UNBLOCK_INPUT;
+ unblock_input ();
done: