/* 16-bit Windows Selection processing for emacs on MS-Windows
Copyright (C) 1996, 1997 Free Software Foundation.
-
+
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
empty_clipboard ()
{
__dpmi_regs regs;
-
+
/* Calls Int 2Fh/AX=1702h
Return Values AX == 0: Error occurred
<> 0: OK, Clipboard emptied */
the next loop by an additional test. */
register unsigned char *lcdp =
last_clipboard_text == NULL ? &null_char : last_clipboard_text;
-
+
/* Copy data from low memory, remove CR
characters before LF if needed. */
_farsetsel (_dos_ds);
int no_crlf_conversion;
CHECK_STRING (string, 0);
-
+
if (NILP (frame))
frame = Fselected_frame ();
CHECK_LIVE_FRAME (frame, 0);
if ( !FRAME_MSDOS_P (XFRAME (frame)))
goto done;
-
+
BLOCK_INPUT;
nbytes = STRING_BYTES (XSTRING (string));
if (!open_clipboard ())
goto error;
-
+
ok = empty_clipboard ()
&& ((put_status
= set_clipboard_data (CF_OEMTEXT, src, nbytes, no_crlf_conversion))
if (!no_crlf_conversion)
Vlast_coding_system_used = Qraw_text;
close_clipboard ();
-
+
if (ok) goto unblock;
error:
-
+
ok = 0;
unblock:
}
sit_for (2, 0, 0, 1, 1);
}
-
+
done:
return (ok && put_status == 0 ? string : Qnil);
CHECK_LIVE_FRAME (frame, 0);
if ( !FRAME_MSDOS_P (XFRAME (frame)))
goto done;
-
+
BLOCK_INPUT;
-
+
if (!open_clipboard ())
goto unblock;
unblock:
UNBLOCK_INPUT;
-
+
done:
-
+
return (ret);
}
return Qnil;
}
-void
+void
syms_of_win16select ()
{
defsubr (&Sw16_set_clipboard_data);
"Coding system for communicating with other X clients.\n\
When sending or receiving text via cut_buffer, selection, and clipboard,\n\
the text is encoded or decoded by this coding system.\n\
-A default value is `iso-latin-1-dos'");
- Vselection_coding_system=intern ("iso-latin-1-dos");
+The default value is `iso-latin-1-dos'.");
+ Vselection_coding_system = intern ("iso-latin-1-dos");
DEFVAR_LISP ("next-selection-coding-system", &Vnext_selection_coding_system,
"Coding system for the next communication with other X clients.\n\