Mercurial > hg > xemacs-beta
comparison src/event-msw.c @ 2286:04bc9d2f42c7
[xemacs-hg @ 2004-09-20 19:18:55 by james]
Mark all unused parameters as unused. Also eliminate some unneeded local
variables.
author | james |
---|---|
date | Mon, 20 Sep 2004 19:20:08 +0000 |
parents | a8d8f419b459 |
children | ecf1ebac70d8 |
comparison
equal
deleted
inserted
replaced
2285:914c5afaac33 | 2286:04bc9d2f42c7 |
---|---|
36 | 36 |
37 #define NEED_MSWINDOWS_SHLOBJ /* for IShellLink */ | 37 #define NEED_MSWINDOWS_SHLOBJ /* for IShellLink */ |
38 | 38 |
39 #include <config.h> | 39 #include <config.h> |
40 #include "lisp.h" | 40 #include "lisp.h" |
41 | |
42 #ifdef CYGWIN | |
43 # define USED_IF_CYGWIN(decl) decl | |
44 # define UNUSED_IF_CYGWIN(decl) UNUSED (decl) | |
45 #else | |
46 # define USED_IF_CYGWIN(decl) UNUSED (decl) | |
47 # define UNUSED_IF_CYGWIN(decl) decl | |
48 #endif | |
41 | 49 |
42 #if defined (CYGWIN) && !defined (HAVE_MSG_SELECT) | 50 #if defined (CYGWIN) && !defined (HAVE_MSG_SELECT) |
43 #error We do not support non-select() versions (i.e. very old) of Cygwin. | 51 #error We do not support non-select() versions (i.e. very old) of Cygwin. |
44 #endif | 52 #endif |
45 | 53 |
1105 * removed when the process terminates, but if the lisp process structure | 1113 * removed when the process terminates, but if the lisp process structure |
1106 * is deleted before the process terminates we must delete the process | 1114 * is deleted before the process terminates we must delete the process |
1107 * handle since it will be invalid and will cause the wait to fail | 1115 * handle since it will be invalid and will cause the wait to fail |
1108 */ | 1116 */ |
1109 void | 1117 void |
1110 mswindows_unwait_process (Lisp_Process *p) | 1118 mswindows_unwait_process (Lisp_Process *UNUSED_IF_CYGWIN (p)) |
1111 { | 1119 { |
1112 #ifndef CYGWIN | 1120 #ifndef CYGWIN |
1113 remove_waitable_handle (get_nt_process_handle (p)); | 1121 remove_waitable_handle (get_nt_process_handle (p)); |
1114 #endif /* CYGWIN */ | 1122 #endif /* CYGWIN */ |
1115 } | 1123 } |
1143 /* | 1151 /* |
1144 * This is an unsafe part of event pump, guarded by | 1152 * This is an unsafe part of event pump, guarded by |
1145 * condition_case. See mswindows_pump_outstanding_events | 1153 * condition_case. See mswindows_pump_outstanding_events |
1146 */ | 1154 */ |
1147 static Lisp_Object | 1155 static Lisp_Object |
1148 mswindows_unsafe_pump_events (void *arg) | 1156 mswindows_unsafe_pump_events (void *UNUSED (arg)) |
1149 { | 1157 { |
1150 /* This function can call lisp */ | 1158 /* This function can call lisp */ |
1151 Lisp_Object event = Fmake_event (Qnil, Qnil); | 1159 Lisp_Object event = Fmake_event (Qnil, Qnil); |
1152 struct gcpro gcpro1; | 1160 struct gcpro gcpro1; |
1153 int do_redisplay = 0; | 1161 int do_redisplay = 0; |
1667 | 1675 |
1668 /* | 1676 /* |
1669 * Callback procedure for synchronous timer messages | 1677 * Callback procedure for synchronous timer messages |
1670 */ | 1678 */ |
1671 static void CALLBACK | 1679 static void CALLBACK |
1672 mswindows_wm_timer_callback (HWND hwnd, UINT umsg, UINT id_timer, DWORD dwtime) | 1680 mswindows_wm_timer_callback (HWND UNUSED (hwnd), UINT UNUSED (umsg), |
1681 UINT id_timer, DWORD dwtime) | |
1673 { | 1682 { |
1674 Lisp_Object emacs_event = Fmake_event (Qnil, Qnil); | 1683 Lisp_Object emacs_event = Fmake_event (Qnil, Qnil); |
1675 | 1684 |
1676 if (KillTimer (NULL, id_timer)) | 1685 if (KillTimer (NULL, id_timer)) |
1677 --mswindows_pending_timers_count; | 1686 --mswindows_pending_timers_count; |
1710 static int dde_eval_pending; | 1719 static int dde_eval_pending; |
1711 static Lisp_Object dde_eval_result; | 1720 static Lisp_Object dde_eval_result; |
1712 static Lisp_Object dde_eval_error; | 1721 static Lisp_Object dde_eval_error; |
1713 | 1722 |
1714 static Lisp_Object | 1723 static Lisp_Object |
1715 dde_error (Lisp_Object err, Lisp_Object obj) | 1724 dde_error (Lisp_Object err, Lisp_Object UNUSED (obj)) |
1716 { | 1725 { |
1717 dde_eval_error = err; | 1726 dde_eval_error = err; |
1718 return Qnil; | 1727 return Qnil; |
1719 } | 1728 } |
1720 | 1729 |
1879 DdePostAdvise (mswindows_dde_mlid, mswindows_dde_topic_eval, hsz); | 1888 DdePostAdvise (mswindows_dde_mlid, mswindows_dde_topic_eval, hsz); |
1880 return Qnil; | 1889 return Qnil; |
1881 } | 1890 } |
1882 | 1891 |
1883 HDDEDATA CALLBACK | 1892 HDDEDATA CALLBACK |
1884 mswindows_dde_callback (UINT uType, UINT uFmt, HCONV hconv, | 1893 mswindows_dde_callback (UINT uType, UINT uFmt, HCONV UNUSED (hconv), |
1885 HSZ hszTopic, HSZ hszItem, HDDEDATA hdata, | 1894 HSZ hszTopic, HSZ hszItem, HDDEDATA hdata, |
1886 DWORD dwData1, DWORD dwData2) | 1895 DWORD UNUSED (dwData1), DWORD UNUSED (dwData2)) |
1887 { | 1896 { |
1888 switch (uType) | 1897 switch (uType) |
1889 { | 1898 { |
1890 case XTYP_CONNECT: | 1899 case XTYP_CONNECT: |
1891 if (!DdeCmpStringHandles (hszTopic, mswindows_dde_topic_system) | 1900 if (!DdeCmpStringHandles (hszTopic, mswindows_dde_topic_system) |
4052 /* | 4061 /* |
4053 * Translate a mswindows virtual key to a keysym. | 4062 * Translate a mswindows virtual key to a keysym. |
4054 * Only returns non-Qnil for keys that don't generate WM_CHAR messages | 4063 * Only returns non-Qnil for keys that don't generate WM_CHAR messages |
4055 * or whose ASCII codes (like space) xemacs doesn't like. | 4064 * or whose ASCII codes (like space) xemacs doesn't like. |
4056 */ | 4065 */ |
4057 Lisp_Object mswindows_key_to_emacs_keysym (int mswindows_key, int mods, | 4066 Lisp_Object mswindows_key_to_emacs_keysym (int mswindows_key, |
4058 int extendedp) | 4067 int UNUSED (mods), int extendedp) |
4059 { | 4068 { |
4060 if (extendedp) /* Keys not present on a 82 key keyboard */ | 4069 if (extendedp) /* Keys not present on a 82 key keyboard */ |
4061 { | 4070 { |
4062 switch (mswindows_key) | 4071 switch (mswindows_key) |
4063 { | 4072 { |
4267 | 4276 |
4268 /* | 4277 /* |
4269 * Find the console that matches the supplied mswindows window handle | 4278 * Find the console that matches the supplied mswindows window handle |
4270 */ | 4279 */ |
4271 Lisp_Object | 4280 Lisp_Object |
4272 mswindows_find_console (HWND hwnd) | 4281 mswindows_find_console (HWND UNUSED (hwnd)) |
4273 { | 4282 { |
4274 /* We only support one console */ | 4283 /* We only support one console */ |
4275 return XCAR (Vconsole_list); | 4284 return XCAR (Vconsole_list); |
4276 } | 4285 } |
4277 | 4286 |
4612 } | 4621 } |
4613 #endif /* CYGWIN */ | 4622 #endif /* CYGWIN */ |
4614 } | 4623 } |
4615 | 4624 |
4616 static void | 4625 static void |
4617 emacs_mswindows_select_console (struct console *con) | 4626 emacs_mswindows_select_console (struct console *USED_IF_CYGWIN (con)) |
4618 { | 4627 { |
4619 #ifdef CYGWIN | 4628 #ifdef CYGWIN |
4620 if (CONSOLE_MSWINDOWS_P (con)) | 4629 if (CONSOLE_MSWINDOWS_P (con)) |
4621 return; /* mswindows consoles are automatically selected */ | 4630 return; /* mswindows consoles are automatically selected */ |
4622 | 4631 |
4647 #endif /* 0 */ | 4656 #endif /* 0 */ |
4648 #endif | 4657 #endif |
4649 } | 4658 } |
4650 | 4659 |
4651 static void | 4660 static void |
4652 emacs_mswindows_unselect_console (struct console *con) | 4661 emacs_mswindows_unselect_console (struct console *USED_IF_CYGWIN (con)) |
4653 { | 4662 { |
4654 #ifdef CYGWIN | 4663 #ifdef CYGWIN |
4655 if (CONSOLE_MSWINDOWS_P (con)) | 4664 if (CONSOLE_MSWINDOWS_P (con)) |
4656 return; /* mswindows consoles are automatically selected */ | 4665 return; /* mswindows consoles are automatically selected */ |
4657 | 4666 |
4737 #endif /* CYGWIN */ | 4746 #endif /* CYGWIN */ |
4738 } | 4747 } |
4739 | 4748 |
4740 static void | 4749 static void |
4741 emacs_mswindows_delete_io_streams (Lisp_Object instream, | 4750 emacs_mswindows_delete_io_streams (Lisp_Object instream, |
4742 Lisp_Object outstream, | 4751 Lisp_Object USED_IF_CYGWIN (outstream), |
4743 Lisp_Object errstream, | 4752 Lisp_Object errstream, |
4744 USID *in_usid, | 4753 USID *in_usid, |
4745 USID *err_usid) | 4754 USID *err_usid) |
4746 { | 4755 { |
4747 #ifdef CYGWIN | 4756 #ifdef CYGWIN |
4763 (errstream)))); | 4772 (errstream)))); |
4764 #endif /* CYGWIN */ | 4773 #endif /* CYGWIN */ |
4765 } | 4774 } |
4766 | 4775 |
4767 static int | 4776 static int |
4768 emacs_mswindows_current_event_timestamp (struct console *c) | 4777 emacs_mswindows_current_event_timestamp (struct console *UNUSED (c)) |
4769 { | 4778 { |
4770 return GetTickCount (); | 4779 return GetTickCount (); |
4771 } | 4780 } |
4772 | 4781 |
4773 #ifndef HAVE_X_WINDOWS | 4782 #ifndef HAVE_X_WINDOWS |
4774 /* This is called from GC when a process object is about to be freed. | 4783 /* This is called from GC when a process object is about to be freed. |
4775 If we've still got pointers to it in this file, we're gonna lose hard. | 4784 If we've still got pointers to it in this file, we're gonna lose hard. |
4776 */ | 4785 */ |
4777 void debug_process_finalization (Lisp_Process *p); | 4786 void debug_process_finalization (Lisp_Process *p); |
4778 void | 4787 void |
4779 debug_process_finalization (Lisp_Process *p) | 4788 debug_process_finalization (Lisp_Process *UNUSED (p)) |
4780 { | 4789 { |
4781 #if 0 /* #### */ | 4790 #if 0 /* #### */ |
4782 Lisp_Object instr, outstr, errstr; | 4791 Lisp_Object instr, outstr, errstr; |
4783 | 4792 |
4784 get_process_streams (p, &instr, &outstr, &errstr); | 4793 get_process_streams (p, &instr, &outstr, &errstr); |