From: Eli Zaretskii Date: Wed, 22 Apr 1998 10:26:10 +0000 (+0000) Subject: (Fwin16_set_clipboard_data): Call UNBLOCK_INPUT before calling sit_for. X-Git-Tag: emacs-20.3~1369 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=31354c30f668c552339b0636ae1e65e44a19cb86;p=emacs.git (Fwin16_set_clipboard_data): Call UNBLOCK_INPUT before calling sit_for. (Fwin16_get_clipboard_data, Fwin16_set_clipboard_data): Balance the calls to BLOCK_INPUT and UNBLOCK_INPUT. --- diff --git a/src/w16select.c b/src/w16select.c index 87f341136a4..7ddda5a5a8e 100644 --- a/src/w16select.c +++ b/src/w16select.c @@ -419,12 +419,15 @@ DEFUN ("win16-set-clipboard-data", Fwin16_set_clipboard_data, Swin16_set_clipboa close_clipboard (); - if (ok) goto done; + if (ok) goto unblock; error: ok = 0; + unblock: + 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), depending on user system configuration.) If we just silently @@ -437,7 +440,6 @@ DEFUN ("win16-set-clipboard-data", Fwin16_set_clipboard_data, Swin16_set_clipboa } done: - UNBLOCK_INPUT; return (ok ? string : Qnil); } @@ -464,7 +466,7 @@ DEFUN ("win16-get-clipboard-data", Fwin16_get_clipboard_data, Swin16_get_clipboa BLOCK_INPUT; if (!open_clipboard ()) - goto done; + goto unblock; if ((data_size = get_clipboard_data_size (CF_TEXT)) == 0 || (htext = (unsigned char *)xmalloc (data_size)) == 0) @@ -481,9 +483,11 @@ DEFUN ("win16-get-clipboard-data", Fwin16_get_clipboard_data, Swin16_get_clipboa closeclip: close_clipboard (); + + unblock: + UNBLOCK_INPUT; done: - UNBLOCK_INPUT; return (ret); }