aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero <[email protected]>2011-03-14 18:07:53 +0100
committerJuanma Barranquero <[email protected]>2011-03-14 18:07:53 +0100
commit7684e57b24092dbfbbe7fc62a1a544e40e2ce88a (patch)
treefee092544c95e422483f41079d1bfd9dfdd6248f
parente756ec02a4415f054cac4887a1b03ae4d7ed6ccb (diff)
src/w32*.c: Clean up extern declarations.
* w32select.c: Don't #include "keyboard.h". (run_protected): Add extern declaration for waiting_for_input. * lisp.h (VWindow_system, Qfile_name_history): * keyboard.h (lispy_function_keys) [WINDOWSNT]: * w32term.h (w32_system_caret_hwnd, w32_system_caret_height) (w32_system_caret_x, w32_system_caret_y): Declare extern. * w32.c (Qlocal, noninteractive1, inhibit_window_system): * w32console.c (detect_input_pending, read_input_pending) (encode_terminal_code): * w32fns.c (quit_char, lispy_function_keys, Qtooltip) (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x) (w32_system_caret_y, Qfile_name_history): * w32font.c (w32font_driver, QCantialias, QCotf, QClang): * w32inevt.c (reinvoke_input_signal, lispy_function_keys): * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map) (Qoverriding_terminal_local_map, Qmenu_bar_update_hook): * w32proc.c (Qlocal, report_file_error): * w32term.c (Vwindow_system, updating_frame): * w32uniscribe.c (initialized, uniscribe_font_driver): Remove unneeded extern declarations.
-rw-r--r--src/ChangeLog25
-rw-r--r--src/keyboard.h9
-rw-r--r--src/lisp.h2
-rw-r--r--src/w32.c5
-rw-r--r--src/w32console.c9
-rw-r--r--src/w32fns.c15
-rw-r--r--src/w32font.c3
-rw-r--r--src/w32inevt.c9
-rw-r--r--src/w32menu.c8
-rw-r--r--src/w32proc.c8
-rw-r--r--src/w32select.c2
-rw-r--r--src/w32term.c14
-rw-r--r--src/w32term.h6
-rw-r--r--src/w32uniscribe.c4
14 files changed, 46 insertions, 73 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 8e5c9564f5..09413b2648 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,28 @@
+2011-03-14 Juanma Barranquero <[email protected]>
+
+ * lisp.h (VWindow_system, Qfile_name_history):
+ * keyboard.h (lispy_function_keys) [WINDOWSNT]:
+ * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
+ (w32_system_caret_x, w32_system_caret_y): Declare extern.
+
+ * w32select.c: Don't #include "keyboard.h".
+ (run_protected): Add extern declaration for waiting_for_input.
+
+ * w32.c (Qlocal, noninteractive1, inhibit_window_system):
+ * w32console.c (detect_input_pending, read_input_pending)
+ (encode_terminal_code):
+ * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
+ (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
+ (w32_system_caret_y, Qfile_name_history):
+ * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
+ * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
+ * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
+ (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
+ * w32proc.c (Qlocal, report_file_error):
+ * w32term.c (Vwindow_system, updating_frame):
+ * w32uniscribe.c (initialized, uniscribe_font_driver):
+ Remove unneeded extern declarations.
+
2011-03-14 Chong Yidong <[email protected]>
* buffer.c (Fmake_indirect_buffer): Fix incorrect assertion.
diff --git a/src/keyboard.h b/src/keyboard.h
index 10bf16d5c5..f2000a4464 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -90,7 +90,7 @@ struct kboard
/* User-supplied table to translate input characters through. */
Lisp_Object KBOARD_INTERNAL_FIELD (Vkeyboard_translate_table);
-
+
/* Last command that may be repeated by `repeat'. */
Lisp_Object KBOARD_INTERNAL_FIELD (Vlast_repeatable_command);
@@ -140,12 +140,12 @@ struct kboard
/* Keymap mapping keys to alternative preferred forms.
See the DEFVAR for more documentation. */
Lisp_Object KBOARD_INTERNAL_FIELD (Vlocal_function_key_map);
-
+
/* Keymap mapping ASCII function key sequences onto their preferred
forms. Initialized by the terminal-specific lisp files. See the
DEFVAR for more documentation. */
Lisp_Object KBOARD_INTERNAL_FIELD (Vinput_decode_map);
-
+
/* Minibufferless frames on this display use this frame's minibuffer. */
Lisp_Object KBOARD_INTERNAL_FIELD (Vdefault_minibuffer_frame);
@@ -518,3 +518,6 @@ extern int tty_read_avail_input (struct terminal *, int,
struct input_event *);
extern EMACS_TIME timer_check (int);
+#ifdef WINDOWSNT
+extern const char *const lispy_function_keys[];
+#endif
diff --git a/src/lisp.h b/src/lisp.h
index 113585320a..0f55da317c 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2607,6 +2607,7 @@ extern void syms_of_insdel (void);
/* Defined in dispnew.c */
extern Lisp_Object selected_frame;
+extern Lisp_Object Vwindow_system;
EXFUN (Fding, 1);
EXFUN (Fredraw_frame, 1);
EXFUN (Fsleep_for, 2);
@@ -3009,6 +3010,7 @@ extern Lisp_Object Qfile_error;
extern Lisp_Object Qfile_exists_p;
extern Lisp_Object Qfile_directory_p;
extern Lisp_Object Qinsert_file_contents;
+extern Lisp_Object Qfile_name_history;
EXFUN (Ffind_file_name_handler, 2);
EXFUN (Ffile_name_as_directory, 1);
EXFUN (Fexpand_file_name, 2);
diff --git a/src/w32.c b/src/w32.c
index ae2373be46..721cea07d2 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -147,9 +147,6 @@ typedef HRESULT (WINAPI * ShGetFolderPath_fn)
void globals_of_w32 (void);
static DWORD get_rid (PSID);
-/* Defined in process.c for its own purpose. */
-extern Lisp_Object Qlocal;
-
/* Initialization states.
@@ -5666,8 +5663,6 @@ sys_write (int fd, const void * buffer, unsigned int count)
static void
check_windows_init_file (void)
{
- extern int noninteractive, inhibit_window_system;
-
/* A common indication that Emacs is not installed properly is when
it cannot find the Windows installation file. If this file does
not exist in the expected place, tell the user. */
diff --git a/src/w32console.c b/src/w32console.c
index 31c4a7c4e5..3c200405cb 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -41,12 +41,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* from window.c */
extern Lisp_Object Frecenter (Lisp_Object);
-/* from keyboard.c */
-extern int detect_input_pending (void);
-
-/* from sysdep.c */
-extern int read_input_pending (void);
-
static void w32con_move_cursor (struct frame *f, int row, int col);
static void w32con_clear_to_end (struct frame *f);
static void w32con_clear_frame (struct frame *f);
@@ -277,9 +271,6 @@ w32con_insert_glyphs (struct frame *f, register struct glyph *start,
}
}
-extern unsigned char *encode_terminal_code (struct glyph *, int,
- struct coding_system *);
-
static void
w32con_write_glyphs (struct frame *f, register struct glyph *string,
register int len)
diff --git a/src/w32fns.c b/src/w32fns.c
index 09442d41e1..0c899cdcef 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -80,10 +80,6 @@ extern void w32_menu_display_help (HWND, HMENU, UINT, UINT);
extern void w32_free_menu_strings (HWND);
extern const char *map_w32_filename (const char *, const char **);
-extern int quit_char;
-
-extern const char *const lispy_function_keys[];
-
/* If non-zero, a w32 timer that, when it expires, displays an
hourglass cursor on all frames. */
static unsigned hourglass_timer = 0;
@@ -187,18 +183,10 @@ unsigned int msh_mousewheel = 0;
#define MENU_FREE_DELAY 1000
static unsigned menu_free_timer = 0;
-extern Lisp_Object Qtooltip;
-
#ifdef GLYPH_DEBUG
int image_cache_refcount, dpyinfo_refcount;
#endif
-
-extern HWND w32_system_caret_hwnd;
-
-extern int w32_system_caret_height;
-extern int w32_system_caret_x;
-extern int w32_system_caret_y;
static HWND w32_visible_system_caret_hwnd;
/* From w32menu.c */
@@ -5851,7 +5839,6 @@ Value is t if tooltip was open, nil otherwise. */)
/***********************************************************************
File selection dialog
***********************************************************************/
-extern Lisp_Object Qfile_name_history;
/* Callback for altering the behavior of the Open File dialog.
Makes the Filename text field contain "Current Directory" and be
@@ -5899,7 +5886,7 @@ file_dialog_callback (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
no man's land and the user will be unable to tab through the
dialog box (pressing tab will only result in a beep).
Avoid that problem by setting focus to the list here. */
- if (CDN_INITDONE == notify->hdr.code)
+ if (notify->hdr.code == CDN_INITDONE)
SetFocus (list);
}
else
diff --git a/src/w32font.c b/src/w32font.c
index aef62f61a3..40ff0782b8 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -54,8 +54,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define JOHAB_CHARSET 130
#endif
-extern struct font_driver w32font_driver;
-
Lisp_Object Qgdi;
Lisp_Object Quniscribe;
static Lisp_Object QCformat;
@@ -64,7 +62,6 @@ static Lisp_Object Qserif, Qscript, Qdecorative;
static Lisp_Object Qraster, Qoutline, Qunknown;
/* antialiasing */
-extern Lisp_Object QCantialias, QCotf, QClang; /* defined in font.c */
extern Lisp_Object Qnone; /* reuse from w32fns.c */
static Lisp_Object Qstandard, Qsubpixel, Qnatural;
diff --git a/src/w32inevt.c b/src/w32inevt.c
index d0b097100f..c4858dea90 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -40,18 +40,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "w32heap.h"
#include "w32term.h"
-/* stdin, from ntterm */
+/* stdin, from w32console.c */
extern HANDLE keyboard_handle;
/* Info for last mouse motion */
static COORD movement_pos;
static DWORD movement_time;
-/* from keyboard.c */
-extern void reinvoke_input_signal (void);
-
+/* from w32fns.c */
extern unsigned int map_keypad_keys (unsigned int, unsigned int);
-
extern unsigned int w32_key_to_modifier (int key);
/* Event queue */
@@ -261,8 +258,6 @@ w32_kbd_patch_key (KEY_EVENT_RECORD *event)
}
-extern const char *const lispy_function_keys[];
-
static int faked_key = 0;
/* return code -1 means that event_queue_ptr won't be incremented.
diff --git a/src/w32menu.c b/src/w32menu.c
index 92447eb9fa..a2e62f24f6 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -84,14 +84,6 @@ MessageBoxW_Proc unicode_message_box = NULL;
Lisp_Object Qdebug_on_next_call;
-extern Lisp_Object Qmenu_bar;
-
-extern Lisp_Object QCtoggle, QCradio;
-
-extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
-
-extern Lisp_Object Qmenu_bar_update_hook;
-
void set_frame_menubar (FRAME_PTR, int, int);
#ifdef HAVE_DIALOGS
diff --git a/src/w32proc.c b/src/w32proc.c
index bb8b428ffe..e94d9aa325 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -67,8 +67,6 @@ extern BOOL WINAPI IsValidLocale (LCID, DWORD);
+ ((DWORD)(var) - (section)->VirtualAddress) \
+ (filedata).file_base))
-extern Lisp_Object Qlocal;
-
Lisp_Object Qhigh, Qlow;
#ifdef EMACSDEBUG
@@ -1053,7 +1051,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
detect that we were woken up by C-g, we return -1 with errno set to
EINTR as on Unix. */
-/* From ntterm.c */
+/* From w32console.c */
extern HANDLE keyboard_handle;
/* From w32xfns.c */
@@ -1559,8 +1557,6 @@ sys_kill (int pid, int sig)
return rc;
}
-/* extern int report_file_error (char *, Lisp_Object); */
-
/* The following two routines are used to manipulate stdin, stdout, and
stderr of our child processes.
@@ -1660,7 +1656,7 @@ set_process_dir (char * dir)
dial-up users to only be connected when they actually need to use
socket services. */
-/* From nt.c */
+/* From w32.c */
extern HANDLE winsock_lib;
extern BOOL term_winsock (void);
extern BOOL init_winsock (int load_now);
diff --git a/src/w32select.c b/src/w32select.c
index 23d5fb68c7..ef0cb3adc2 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -78,7 +78,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "w32term.h" /* for all of the w32 includes */
#include "w32heap.h" /* os_subtype */
#include "blockinput.h"
-#include "keyboard.h" /* cmd_error_internal() */
#include "charset.h"
#include "coding.h"
#include "character.h"
@@ -391,6 +390,7 @@ run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg)
with global variables and calling strange looking functions. Is
this really the right way to run Lisp callbacks? */
+ extern int waiting_for_input; /* from keyboard.c */
int owfi;
BLOCK_INPUT;
diff --git a/src/w32term.c b/src/w32term.c
index 67e853f21f..f31c4e90e7 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -88,8 +88,6 @@ extern void free_frame_menubar (struct frame *);
extern int w32_codepage_for_font (char *fontname);
extern Cursor w32_load_cursor (LPCTSTR name);
-extern Lisp_Object Vwindow_system;
-
#define x_any_window_to_frame x_window_to_frame
#define x_top_window_to_frame x_window_to_frame
@@ -138,13 +136,6 @@ BOOL (WINAPI *pfnSetLayeredWindowAttributes) (HWND, COLORREF, BYTE, DWORD);
#define WS_EX_LAYERED 0x80000
#endif
-/* Frame being updated by update_frame. This is declared in term.c.
- This is set by update_begin and looked at by all the
- w32 functions. It is zero while not inside an update.
- In that case, the w32 functions assume that `SELECTED_FRAME ()'
- is the frame to apply to. */
-extern struct frame *updating_frame;
-
/* This is a frame waiting to be autoraised, within w32_read_socket. */
struct frame *pending_autoraise_frame;
@@ -2536,8 +2527,7 @@ x_delete_glyphs (struct frame *f, register int n)
}
-/* Clear entire frame. If updating_frame is non-null, clear that
- frame. Otherwise clear the selected frame. */
+/* Clear entire frame. */
static void
x_clear_frame (struct frame *f)
@@ -6060,7 +6050,7 @@ w32_create_terminal (struct w32_display_info *dpyinfo)
terminal->mouse_position_hook = w32_mouse_position;
terminal->frame_rehighlight_hook = w32_frame_rehighlight;
terminal->frame_raise_lower_hook = w32_frame_raise_lower;
- // terminal->fullscreen_hook = XTfullscreen_hook;
+ /* terminal->fullscreen_hook = XTfullscreen_hook; */
terminal->set_vertical_scroll_bar_hook = w32_set_vertical_scroll_bar;
terminal->condemn_scroll_bars_hook = w32_condemn_scroll_bars;
terminal->redeem_scroll_bar_hook = w32_redeem_scroll_bar;
diff --git a/src/w32term.h b/src/w32term.h
index c79352a8db..cf6751b7d6 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -547,7 +547,7 @@ do { \
#define WM_APPCOMMAND 0x319
#define GET_APPCOMMAND_LPARAM(lParam) (HIWORD(lParam) & 0x7fff)
#endif
-#ifndef WM_UNICHAR
+#ifndef WM_UNICHAR
#define WM_UNICHAR 0x109
#endif
#ifndef UNICODE_NOCHAR
@@ -697,3 +697,7 @@ typedef BOOL (WINAPI * AppendMenuW_Proc) (
IN UINT_PTR,
IN LPCWSTR);
+extern HWND w32_system_caret_hwnd;
+extern int w32_system_caret_height;
+extern int w32_system_caret_x;
+extern int w32_system_caret_y;
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index 319f934e3b..39d1ee5c85 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -52,10 +52,6 @@ int uniscribe_available = 0;
extern Lisp_Object Quniscribe;
extern Lisp_Object Qopentype;
-extern int initialized;
-
-extern struct font_driver uniscribe_font_driver;
-
/* EnumFontFamiliesEx callback. */
static int CALLBACK add_opentype_font_name_to_list (ENUMLOGFONTEX *,
NEWTEXTMETRICEX *,