X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fselect-msw.c;fp=src%2Fselect-msw.c;h=3096d542dcabb8bc4f2e72f6435f5417a5a450c9;hp=0000000000000000000000000000000000000000;hb=6883ee56ec887c2c48abe5b06b5e66aa74031910;hpb=5db996688c255b7f4bbe096f935b10d4c4ab7ade;ds=sidebyside diff --git a/src/select-msw.c b/src/select-msw.c new file mode 100644 index 0000000..3096d54 --- /dev/null +++ b/src/select-msw.c @@ -0,0 +1,180 @@ +/* mswindows selection processing for XEmacs + Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. + +This file is part of XEmacs. + +XEmacs is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +XEmacs is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with XEmacs; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +/* Synched up with: Not synched with FSF. */ + +/* Authorship: + + Written by Kevin Gallo for FSF Emacs. + Rewritten for mswindows by Jonathan Harris, December 1997 for 21.0. + */ + + +#include +#include "lisp.h" + +#include "console-msw.h" + +DEFUN ("mswindows-set-clipboard", Fmswindows_set_clipboard, 1, 1, 0, /* +Copy STRING to the mswindows clipboard. +*/ + (string)) +{ + int rawsize, size, i; + unsigned char *src, *dst, *next; + HGLOBAL h = NULL; + + CHECK_STRING (string); + + /* Calculate size with LFs converted to CRLFs because + * CF_TEXT format uses CRLF delimited ASCIIZ */ + src = XSTRING_DATA (string); + size = rawsize = XSTRING_LENGTH (string) + 1; + for (i=0; i