+2000-08-17 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * w16select.c (set_clipboard_data): If there's not enough memory
+ to put text into clipboard, return 1, as Fw16_set_clipboard_data
+ expects. In case of other failures, return 3.
+ (system_error_msg): New error message.
+ (Fw16_set_clipboard_data): If set_clipboard_data returns 3, print
+ system_error_msg.
+
2000-08-16 Gerd Moellmann <gerd@gnu.org>
* term.c (write_glyphs): Also turn off inverse video after turning
unsigned char *dp = Data, *dstart = dp;
if (Format != CF_OEMTEXT)
- return 0;
+ return 3;
/* need to know final size after '\r' chars are inserted (the
standard CF_OEMTEXT clipboard format uses CRLF line endings,
}
if (clipboard_compact (truelen) < truelen)
- return 0;
+ return 1;
if ((xbuf_addr = alloc_xfer_buf (truelen)) == 0)
- return 0;
+ return 1;
/* Move the buffer into the low memory, convert LF into CR-LF if needed. */
if (Raw)
if (regs.x.ax == 0)
*last_clipboard_text = '\0';
- /* Zero means success, otherwise (1 or 2) it's an error. */
- return regs.x.ax > 0 ? 0 : 1;
+ /* Zero means success, otherwise (1, 2, or 3) it's an error. */
+ return regs.x.ax > 0 ? 0 : 3;
}
/* Return the size of the clipboard data of format FORMAT. */
"(Not enough DOS memory to put saved text into clipboard.)";
static char binary_msg[] =
"(Binary characters in saved text; clipboard data not set.)";
+static char system_error_msg[] =
+ "(Clipboard interface failure; clipboard data not set.)";
DEFUN ("w16-set-clipboard-data", Fw16_set_clipboard_data, Sw16_set_clipboard_data, 1, 2, 0,
"This sets the clipboard data to the given text.")
case 2:
message2 (binary_msg, sizeof (binary_msg) - 1, 0);
break;
+ case 3:
+ message2 (system_error_msg, sizeof (system_error_msg) - 1, 0);
+ break;
}
sit_for (2, 0, 0, 1, 1);
}