aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32select.c
diff options
context:
space:
mode:
authorJuanma Barranquero2010-07-06 16:22:29 +0200
committerJuanma Barranquero2010-07-06 16:22:29 +0200
commitb56ceb92bf4d470af2e9172d1fcd4d85232c40a6 (patch)
tree50ab60b4715be45ed671c386c5b9336b45443539 /src/w32select.c
parent7af07b967171736a35e0af8b6ecf6feb072184dc (diff)
downloademacs-b56ceb92bf4d470af2e9172d1fcd4d85232c40a6.tar.gz
emacs-b56ceb92bf4d470af2e9172d1fcd4d85232c40a6.zip
src/w32*.c: Convert function definitions to standard C.
Diffstat (limited to 'src/w32select.c')
-rw-r--r--src/w32select.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/w32select.c b/src/w32select.c
index 2da4b333c2a..4ecd926ed79 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -30,7 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
30 * (CF_UNICODETEXT), when a well-known console codepage is given, they 30 * (CF_UNICODETEXT), when a well-known console codepage is given, they
31 * apply to the console version of the clipboard data (CF_OEMTEXT), 31 * apply to the console version of the clipboard data (CF_OEMTEXT),
32 * else they apply to the normal 8-bit text clipboard (CF_TEXT). 32 * else they apply to the normal 8-bit text clipboard (CF_TEXT).
33 * 33 *
34 * When pasting (getting data from the OS), the clipboard format that 34 * When pasting (getting data from the OS), the clipboard format that
35 * matches the {next-}selection-coding-system is retrieved. If 35 * matches the {next-}selection-coding-system is retrieved. If
36 * Unicode is requested, but not available, 8-bit text (CF_TEXT) is 36 * Unicode is requested, but not available, 8-bit text (CF_TEXT) is
@@ -45,13 +45,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
45 * 45 *
46 * Scenarios to use the facilities for customizing the selection 46 * Scenarios to use the facilities for customizing the selection
47 * coding system are: 47 * coding system are:
48 * 48 *
49 * ;; Generally use KOI8-R instead of the russian MS codepage for 49 * ;; Generally use KOI8-R instead of the russian MS codepage for
50 * ;; the 8-bit clipboard. 50 * ;; the 8-bit clipboard.
51 * (set-selection-coding-system 'koi8-r-dos) 51 * (set-selection-coding-system 'koi8-r-dos)
52 * 52 *
53 * Or 53 * Or
54 * 54 *
55 * ;; Create a special clipboard copy function that uses codepage 55 * ;; Create a special clipboard copy function that uses codepage
56 * ;; 1253 (Greek) to copy Greek text to a specific non-Unicode 56 * ;; 1253 (Greek) to copy Greek text to a specific non-Unicode
57 * ;; application. 57 * ;; application.
@@ -71,7 +71,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
71 * types should be supported is also moved to Lisp, functionality 71 * types should be supported is also moved to Lisp, functionality
72 * could be expanded to CF_HTML, CF_RTF and maybe other types. 72 * could be expanded to CF_HTML, CF_RTF and maybe other types.
73 */ 73 */
74 74
75#include <config.h> 75#include <config.h>
76#include <setjmp.h> 76#include <setjmp.h>
77#include "lisp.h" 77#include "lisp.h"
@@ -89,8 +89,8 @@ static HGLOBAL convert_to_handle_as_ascii (void);
89static HGLOBAL convert_to_handle_as_coded (Lisp_Object coding_system); 89static HGLOBAL convert_to_handle_as_coded (Lisp_Object coding_system);
90static Lisp_Object render (Lisp_Object oformat); 90static Lisp_Object render (Lisp_Object oformat);
91static Lisp_Object render_locale (void); 91static Lisp_Object render_locale (void);
92static Lisp_Object render_all (void); 92static Lisp_Object render_all (Lisp_Object ignore);
93static void run_protected (Lisp_Object (*code) (), Lisp_Object arg); 93static void run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg);
94static Lisp_Object lisp_error_handler (Lisp_Object error); 94static Lisp_Object lisp_error_handler (Lisp_Object error);
95static LRESULT CALLBACK owner_callback (HWND win, UINT msg, 95static LRESULT CALLBACK owner_callback (HWND win, UINT msg,
96 WPARAM wp, LPARAM lp); 96 WPARAM wp, LPARAM lp);
@@ -220,7 +220,7 @@ convert_to_handle_as_coded (Lisp_Object coding_system)
220 unsigned char *dst = NULL; 220 unsigned char *dst = NULL;
221 struct coding_system coding; 221 struct coding_system coding;
222 222
223 ONTRACE (fprintf (stderr, "convert_to_handle_as_coded: %s\n", 223 ONTRACE (fprintf (stderr, "convert_to_handle_as_coded: %s\n",
224 SDATA (SYMBOL_NAME (coding_system)))); 224 SDATA (SYMBOL_NAME (coding_system))));
225 225
226 setup_windows_coding_system (coding_system, &coding); 226 setup_windows_coding_system (coding_system, &coding);
@@ -334,7 +334,7 @@ render_locale (void)
334 data survives us. This code will do that. */ 334 data survives us. This code will do that. */
335 335
336static Lisp_Object 336static Lisp_Object
337render_all (void) 337render_all (Lisp_Object ignore)
338{ 338{
339 ONTRACE (fprintf (stderr, "render_all\n")); 339 ONTRACE (fprintf (stderr, "render_all\n"));
340 340
@@ -392,7 +392,7 @@ render_all (void)
392} 392}
393 393
394static void 394static void
395run_protected (Lisp_Object (*code) (), Lisp_Object arg) 395run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg)
396{ 396{
397 /* FIXME: This works but it doesn't feel right. Too much fiddling 397 /* FIXME: This works but it doesn't feel right. Too much fiddling
398 with global variables and calling strange looking functions. Is 398 with global variables and calling strange looking functions. Is
@@ -514,7 +514,7 @@ setup_config (void)
514 && EQ (cfg_coding_system, dos_coding_system)) 514 && EQ (cfg_coding_system, dos_coding_system))
515 return; 515 return;
516 cfg_coding_system = dos_coding_system; 516 cfg_coding_system = dos_coding_system;
517 517
518 /* Set some sensible fallbacks */ 518 /* Set some sensible fallbacks */
519 cfg_codepage = ANSICP; 519 cfg_codepage = ANSICP;
520 cfg_lcid = LOCALE_NEUTRAL; 520 cfg_lcid = LOCALE_NEUTRAL;
@@ -583,7 +583,7 @@ enum_locale_callback (/*const*/ char* loc_string)
583 cfg_clipboard_type = CF_TEXT; 583 cfg_clipboard_type = CF_TEXT;
584 return FALSE; /* Stop enumeration */ 584 return FALSE; /* Stop enumeration */
585 } 585 }
586 586
587 /* Is the wanted codepage the OEM codepage for this locale? */ 587 /* Is the wanted codepage the OEM codepage for this locale? */
588 codepage = cp_from_locale (lcid, CF_OEMTEXT); 588 codepage = cp_from_locale (lcid, CF_OEMTEXT);
589 if (codepage == cfg_codepage) 589 if (codepage == cfg_codepage)
@@ -704,7 +704,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
704 current_lcid = cfg_lcid; 704 current_lcid = cfg_lcid;
705 current_num_nls = 0; 705 current_num_nls = 0;
706 current_requires_encoding = 0; 706 current_requires_encoding = 0;
707 707
708 BLOCK_INPUT; 708 BLOCK_INPUT;
709 709
710 /* Check for non-ASCII characters. While we are at it, count the 710 /* Check for non-ASCII characters. While we are at it, count the
@@ -884,7 +884,7 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data,
884 struct coding_system coding; 884 struct coding_system coding;
885 Lisp_Object coding_system = Qnil; 885 Lisp_Object coding_system = Qnil;
886 Lisp_Object dos_coding_system; 886 Lisp_Object dos_coding_system;
887 887
888 /* `next-selection-coding-system' should override everything, 888 /* `next-selection-coding-system' should override everything,
889 even when the locale passed by the system disagrees. The 889 even when the locale passed by the system disagrees. The
890 only exception is when `next-selection-coding-system' 890 only exception is when `next-selection-coding-system'
@@ -1065,7 +1065,7 @@ and t is the same as `SECONDARY'. */)
1065 dumped version. */ 1065 dumped version. */
1066 1066
1067void 1067void
1068syms_of_w32select () 1068syms_of_w32select (void)
1069{ 1069{
1070 defsubr (&Sw32_set_clipboard_data); 1070 defsubr (&Sw32_set_clipboard_data);
1071 defsubr (&Sw32_get_clipboard_data); 1071 defsubr (&Sw32_get_clipboard_data);
@@ -1076,7 +1076,7 @@ syms_of_w32select ()
1076When sending or receiving text via cut_buffer, selection, and 1076When sending or receiving text via cut_buffer, selection, and
1077clipboard, the text is encoded or decoded by this coding system. 1077clipboard, the text is encoded or decoded by this coding system.
1078The default value is the current system default encoding on 9x/Me and 1078The default value is the current system default encoding on 9x/Me and
1079`utf-16le-dos' (Unicode) on NT/W2K/XP. */); 1079`utf-16le-dos' (Unicode) on NT/W2K/XP. */);
1080 /* The actual value is set dynamically in the dumped Emacs, see 1080 /* The actual value is set dynamically in the dumped Emacs, see
1081 below. */ 1081 below. */
1082 Vselection_coding_system = Qnil; 1082 Vselection_coding_system = Qnil;
@@ -1104,7 +1104,7 @@ set to nil. */);
1104 un-dumped version. */ 1104 un-dumped version. */
1105 1105
1106void 1106void
1107globals_of_w32select () 1107globals_of_w32select (void)
1108{ 1108{
1109 DEFAULT_LCID = GetUserDefaultLCID (); 1109 DEFAULT_LCID = GetUserDefaultLCID ();
1110 /* Drop the sort order from the LCID, so we can compare this with 1110 /* Drop the sort order from the LCID, so we can compare this with