1 |
/* 16-bit Windows Selection processing for emacs on MS-Windows |
/* 16-bit Windows Selection processing for emacs on MS-Windows |
2 |
Copyright (C) 1996, 1997, 2001 Free Software Foundation. |
Copyright (C) 1996, 1997, 2001 Free Software Foundation. |
3 |
|
|
4 |
This file is part of GNU Emacs. |
This file is part of GNU Emacs. |
5 |
|
|
6 |
GNU Emacs is free software; you can redistribute it and/or modify |
GNU Emacs is free software; you can redistribute it and/or modify |
168 |
empty_clipboard () |
empty_clipboard () |
169 |
{ |
{ |
170 |
__dpmi_regs regs; |
__dpmi_regs regs; |
171 |
|
|
172 |
/* Calls Int 2Fh/AX=1702h |
/* Calls Int 2Fh/AX=1702h |
173 |
Return Values AX == 0: Error occurred |
Return Values AX == 0: Error occurred |
174 |
<> 0: OK, Clipboard emptied */ |
<> 0: OK, Clipboard emptied */ |
399 |
the next loop by an additional test. */ |
the next loop by an additional test. */ |
400 |
register unsigned char *lcdp = |
register unsigned char *lcdp = |
401 |
last_clipboard_text == NULL ? &null_char : last_clipboard_text; |
last_clipboard_text == NULL ? &null_char : last_clipboard_text; |
402 |
|
|
403 |
/* Copy data from low memory, remove CR |
/* Copy data from low memory, remove CR |
404 |
characters before LF if needed. */ |
characters before LF if needed. */ |
405 |
_farsetsel (_dos_ds); |
_farsetsel (_dos_ds); |
486 |
Lisp_Object string, frame; |
Lisp_Object string, frame; |
487 |
{ |
{ |
488 |
unsigned ok = 1, put_status = 0; |
unsigned ok = 1, put_status = 0; |
489 |
int nbytes; |
int nbytes, charset_info, no_crlf_conversion; |
490 |
unsigned char *src, *dst = NULL; |
unsigned char *src, *dst = NULL; |
|
int charset_info; |
|
|
int no_crlf_conversion; |
|
491 |
|
|
492 |
CHECK_STRING (string); |
CHECK_STRING (string); |
493 |
|
|
604 |
unsigned data_size, truelen; |
unsigned data_size, truelen; |
605 |
unsigned char *htext; |
unsigned char *htext; |
606 |
Lisp_Object ret = Qnil; |
Lisp_Object ret = Qnil; |
607 |
int no_crlf_conversion; |
int no_crlf_conversion, require_encoding = 0; |
|
int require_encoding = 0; |
|
608 |
|
|
609 |
if (NILP (frame)) |
if (NILP (frame)) |
610 |
frame = Fselected_frame (); |
frame = Fselected_frame (); |
682 |
|
|
683 |
unblock: |
unblock: |
684 |
UNBLOCK_INPUT; |
UNBLOCK_INPUT; |
685 |
|
|
686 |
done: |
done: |
687 |
|
|
688 |
return (ret); |
return (ret); |
689 |
} |
} |
690 |
|
|
733 |
return Qnil; |
return Qnil; |
734 |
} |
} |
735 |
|
|
736 |
void |
void |
737 |
syms_of_win16select () |
syms_of_win16select () |
738 |
{ |
{ |
739 |
defsubr (&Sw16_set_clipboard_data); |
defsubr (&Sw16_set_clipboard_data); |