1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-21 03:52:16 -08:00

src/w32*.c: Convert function definitions to standard C.

This commit is contained in:
Juanma Barranquero 2010-07-06 16:22:29 +02:00
parent 7af07b9671
commit b56ceb92bf
14 changed files with 442 additions and 822 deletions

View file

@ -1,3 +1,9 @@
2010-07-06 Juanma Barranquero <lekktu@gmail.com>
* w32.c, w32console.c, w32fns.c, w32font.c, w32heap.c, w32inevt.c
* w32menu.c, w32proc.c, w32reg.c, w32select.c, w32term.c
* w32uniscribe.c, w32xfns.c: Convert function definitions to standard C.
2010-07-06 Andreas Schwab <schwab@linux-m68k.org>
* xterm.c (x_get_keysym_name): Change type of parameter to int.

View file

@ -148,7 +148,7 @@ extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary;
typedef HRESULT (WINAPI * ShGetFolderPath_fn)
(IN HWND, IN int, IN HANDLE, IN DWORD, OUT char *);
void globals_of_w32 ();
void globals_of_w32 (void);
static DWORD get_rid (PSID);
extern Lisp_Object Vw32_downcase_file_names;
@ -308,7 +308,7 @@ typedef BOOL (WINAPI * GetSystemTimes_Proc) (
/* ** A utility function ** */
static BOOL
is_windows_9x ()
is_windows_9x (void)
{
static BOOL s_b_ret=0;
OSVERSIONINFO os_ver;
@ -329,7 +329,7 @@ is_windows_9x ()
Returns a list of three integers if the times are provided by the OS
(NT derivatives), otherwise it returns the result of current-time. */
Lisp_Object
w32_get_internal_run_time ()
w32_get_internal_run_time (void)
{
if (get_process_times_fn)
{
@ -1035,13 +1035,13 @@ static struct group dflt_group =
};
unsigned
getuid ()
getuid (void)
{
return dflt_passwd.pw_uid;
}
unsigned
geteuid ()
geteuid (void)
{
/* I could imagine arguing for checking to see whether the user is
in the Administrators group and returning a UID of 0 for that
@ -1050,13 +1050,13 @@ geteuid ()
}
unsigned
getgid ()
getgid (void)
{
return dflt_passwd.pw_gid;
}
unsigned
getegid ()
getegid (void)
{
return getgid ();
}
@ -1091,7 +1091,7 @@ getpwnam (char *name)
}
void
init_user_info ()
init_user_info (void)
{
/* Find the user's real name by opening the process token and
looking up the name associated with the user-sid in that token.
@ -1207,7 +1207,7 @@ init_user_info ()
}
int
random ()
random (void)
{
/* rand () on NT gives us 15 random bits...hack together 30 bits. */
return ((rand () << 15) | rand ());
@ -1225,9 +1225,7 @@ srandom (int seed)
case path name components to lower case. */
static void
normalize_filename (fp, path_sep)
register char *fp;
char path_sep;
normalize_filename (register char *fp, char path_sep)
{
char sep;
char *elem;
@ -1283,16 +1281,14 @@ normalize_filename (fp, path_sep)
/* Destructively turn backslashes into slashes. */
void
dostounix_filename (p)
register char *p;
dostounix_filename (register char *p)
{
normalize_filename (p, '/');
}
/* Destructively turn slashes into backslashes. */
void
unixtodos_filename (p)
register char *p;
unixtodos_filename (register char *p)
{
normalize_filename (p, '\\');
}
@ -1301,9 +1297,7 @@ unixtodos_filename (p)
(From msdos.c...probably should figure out a way to share it,
although this code isn't going to ever change.) */
int
crlf_to_lf (n, buf)
register int n;
register unsigned char *buf;
crlf_to_lf (register int n, register unsigned char *buf)
{
unsigned char *np = buf;
unsigned char *startp = buf;
@ -1520,9 +1514,7 @@ alarm (int seconds)
#define REG_ROOT "SOFTWARE\\GNU\\Emacs"
LPBYTE
w32_get_resource (key, lpdwtype)
char *key;
LPDWORD lpdwtype;
w32_get_resource (char *key, LPDWORD lpdwtype)
{
LPBYTE lpvalue;
HKEY hrootkey = NULL;
@ -2691,7 +2683,7 @@ sys_creat (const char * path, int mode)
}
FILE *
sys_fopen(const char * path, const char * mode)
sys_fopen (const char * path, const char * mode)
{
int fd;
int oflag;
@ -2980,7 +2972,7 @@ static int init = 0;
} while (0)
static void
initialize_utc_base ()
initialize_utc_base (void)
{
/* Determine the delta between 1-Jan-1601 and 1-Jan-1970. */
SYSTEMTIME st;
@ -3904,7 +3896,7 @@ BOOL WINAPI global_memory_status_ex (
}
Lisp_Object
list_system_processes ()
list_system_processes (void)
{
struct gcpro gcpro1;
Lisp_Object proclist = Qnil;
@ -3995,8 +3987,7 @@ restore_privilege (TOKEN_PRIVILEGES *priv)
}
static Lisp_Object
ltime (time_sec, time_usec)
long time_sec, time_usec;
ltime (long time_sec, long time_usec)
{
return list3 (make_number ((time_sec >> 16) & 0xffff),
make_number (time_sec & 0xffff),
@ -4006,10 +3997,9 @@ ltime (time_sec, time_usec)
#define U64_TO_LISP_TIME(time) ltime ((time) / 1000000L, (time) % 1000000L)
static int
process_times (h_proc, ctime, etime, stime, utime, ttime, pcpu)
HANDLE h_proc;
Lisp_Object *ctime, *etime, *stime, *utime, *ttime;
double *pcpu;
process_times (HANDLE h_proc, Lisp_Object *ctime, Lisp_Object *etime,
Lisp_Object *stime, Lisp_Object *utime, Lisp_Object *ttime,
double *pcpu)
{
FILETIME ft_creation, ft_exit, ft_kernel, ft_user, ft_current;
ULONGLONG tem1, tem2, tem3, tem;
@ -4059,8 +4049,7 @@ process_times (h_proc, ctime, etime, stime, utime, ttime, pcpu)
}
Lisp_Object
system_process_attributes (pid)
Lisp_Object pid;
system_process_attributes (Lisp_Object pid)
{
struct gcpro gcpro1, gcpro2, gcpro3;
Lisp_Object attrs = Qnil;
@ -4526,7 +4515,7 @@ int h_errno = 0;
normal system codes where they overlap (non-overlapping definitions
are already in <sys/socket.h> */
static void
set_errno ()
set_errno (void)
{
if (winsock_lib == NULL)
h_errno = EINVAL;
@ -4548,7 +4537,7 @@ set_errno ()
}
static void
check_errno ()
check_errno (void)
{
if (h_errno == 0 && winsock_lib != NULL)
pfn_WSASetLastError (0);
@ -5038,7 +5027,7 @@ sys_accept (int s, struct sockaddr * addr, int * addrlen)
int
sys_recvfrom (int s, char * buf, int len, int flags,
struct sockaddr * from, int * fromlen)
struct sockaddr * from, int * fromlen)
{
if (winsock_lib == NULL)
{
@ -5733,7 +5722,7 @@ sys_write (int fd, const void * buffer, unsigned int count)
}
static void
check_windows_init_file ()
check_windows_init_file (void)
{
extern int noninteractive, inhibit_window_system;
@ -5789,7 +5778,7 @@ check_windows_init_file ()
}
void
term_ntproc ()
term_ntproc (void)
{
#ifdef HAVE_SOCKETS
/* shutdown the socket interface if necessary */
@ -5800,7 +5789,7 @@ term_ntproc ()
}
void
init_ntproc ()
init_ntproc (void)
{
#ifdef HAVE_SOCKETS
/* Initialise the socket interface now if available and requested by
@ -5908,7 +5897,8 @@ init_ntproc ()
shutdown_handler ensures that buffers' autosave files are
up to date when the user logs off, or the system shuts down.
*/
BOOL WINAPI shutdown_handler(DWORD type)
BOOL WINAPI
shutdown_handler(DWORD type)
{
/* Ctrl-C and Ctrl-Break are already suppressed, so don't handle them. */
if (type == CTRL_CLOSE_EVENT /* User closes console window. */
@ -5929,7 +5919,7 @@ BOOL WINAPI shutdown_handler(DWORD type)
initialized is non zero (see the function main in emacs.c).
*/
void
globals_of_w32 ()
globals_of_w32 (void)
{
HMODULE kernel32 = GetModuleHandle ("kernel32.dll");
@ -5974,7 +5964,8 @@ globals_of_w32 ()
}
/* For make-serial-process */
int serial_open (char *port)
int
serial_open (char *port)
{
HANDLE hnd;
child_process *cp;
@ -6014,7 +6005,7 @@ int serial_open (char *port)
/* For serial-process-configure */
void
serial_configure (struct Lisp_Process *p,
Lisp_Object contact)
Lisp_Object contact)
{
Lisp_Object childp2 = Qnil;
Lisp_Object tem = Qnil;

View file

@ -42,13 +42,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "w32inevt.h"
/* from window.c */
extern Lisp_Object Frecenter ();
extern Lisp_Object Frecenter (Lisp_Object);
/* from keyboard.c */
extern int detect_input_pending ();
extern int detect_input_pending (void);
/* from sysdep.c */
extern int read_input_pending ();
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);
@ -68,7 +68,7 @@ static WORD w32_face_attributes (struct frame *f, int face_id);
static COORD cursor_coords;
static HANDLE prev_screen, cur_screen;
static WORD char_attr_normal;
static DWORD prev_console_mode;
static DWORD prev_console_mode;
#ifndef USE_SEPARATE_SCREEN
static CONSOLE_CURSOR_INFO prev_console_cursor;
@ -268,7 +268,8 @@ scroll_line (struct frame *f, int dist, int direction)
/* If start is zero insert blanks instead of a string at start ?. */
static void
w32con_insert_glyphs (struct frame *f, register struct glyph *start, register int len)
w32con_insert_glyphs (struct frame *f, register struct glyph *start,
register int len)
{
scroll_line (f, len, RIGHT);
@ -286,7 +287,7 @@ w32con_insert_glyphs (struct frame *f, register struct glyph *start, register in
}
}
extern unsigned char *encode_terminal_code (struct glyph *, int,
extern unsigned char *encode_terminal_code (struct glyph *, int,
struct coding_system *);
static void
@ -438,7 +439,7 @@ w32con_reset_terminal_modes (struct terminal *t)
FillConsoleOutputCharacter (cur_screen, ' ', n, dest, &r);
/* Now that the screen is clear, put the cursor at the top. */
SetConsoleCursorPosition (cur_screen, dest);
#ifdef USE_SEPARATE_SCREEN
SetConsoleActiveScreenBuffer (prev_screen);
#else
@ -511,13 +512,13 @@ struct tty_display_info *current_tty = NULL;
int cost = 0;
int
evalcost (char c)
evalcost (int c)
{
return c;
}
int
cmputc (char c)
cmputc (int c)
{
return c;
}
@ -551,9 +552,7 @@ Wcm_clear (struct tty_display_info *tty)
/* Turn appearances of face FACE_ID on tty frame F on. */
static WORD
w32_face_attributes (f, face_id)
struct frame *f;
int face_id;
w32_face_attributes (struct frame *f, int face_id)
{
WORD char_attr;
struct face *face = FACE_FROM_ID (f, face_id);
@ -609,8 +608,6 @@ vga_stdcolor_name (int idx)
return Qunspecified; /* meaning the default */
}
typedef int (*term_hook) ();
void
initialize_w32_display (struct terminal *term)
{
@ -618,19 +615,19 @@ initialize_w32_display (struct terminal *term)
term->rif = 0; /* No window based redisplay on the console. */
term->cursor_to_hook = w32con_move_cursor;
term->raw_cursor_to_hook = w32con_move_cursor;
term->clear_to_end_hook = w32con_clear_to_end;
term->clear_frame_hook = w32con_clear_frame;
term->raw_cursor_to_hook = w32con_move_cursor;
term->clear_to_end_hook = w32con_clear_to_end;
term->clear_frame_hook = w32con_clear_frame;
term->clear_end_of_line_hook = w32con_clear_end_of_line;
term->ins_del_lines_hook = w32con_ins_del_lines;
term->insert_glyphs_hook = w32con_insert_glyphs;
term->write_glyphs_hook = w32con_write_glyphs;
term->delete_glyphs_hook = w32con_delete_glyphs;
term->ins_del_lines_hook = w32con_ins_del_lines;
term->insert_glyphs_hook = w32con_insert_glyphs;
term->write_glyphs_hook = w32con_write_glyphs;
term->delete_glyphs_hook = w32con_delete_glyphs;
term->ring_bell_hook = w32_sys_ring_bell;
term->reset_terminal_modes_hook = w32con_reset_terminal_modes;
term->reset_terminal_modes_hook = w32con_reset_terminal_modes;
term->set_terminal_modes_hook = w32con_set_terminal_modes;
term->set_terminal_window_hook = w32con_set_terminal_window;
term->update_begin_hook = w32con_update_begin;
term->set_terminal_window_hook = w32con_set_terminal_window;
term->update_begin_hook = w32con_update_begin;
term->update_end_hook = w32con_update_end;
term->read_socket_hook = w32_console_read_socket;
@ -775,7 +772,7 @@ DEFUN ("set-cursor-size", Fset_cursor_size, Sset_cursor_size, 1, 1, 0,
}
void
syms_of_ntterm ()
syms_of_ntterm (void)
{
DEFVAR_BOOL ("w32-use-full-screen-buffer",
&w32_use_full_screen_buffer,

View file

@ -69,11 +69,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define FOF_NO_CONNECTED_ELEMENTS 0x2000
#endif
void syms_of_w32fns ();
void globals_of_w32fns ();
void syms_of_w32fns (void);
void globals_of_w32fns (void);
extern void free_frame_menubar ();
extern double atof ();
extern void free_frame_menubar (struct frame *);
extern double atof (const char *);
extern int w32_console_toggle_lock_key (int, Lisp_Object);
extern void w32_menu_display_help (HWND, HMENU, UINT, UINT);
extern void w32_free_menu_strings (HWND);
@ -316,7 +316,7 @@ extern HMENU current_popup_menu;
static int menubar_in_use = 0;
/* From w32uniscribe.c */
extern void syms_of_w32uniscribe ();
extern void syms_of_w32uniscribe (void);
extern int uniscribe_available;
/* Function prototypes for hourglass support. */
@ -327,7 +327,7 @@ static void w32_hide_hourglass (void);
/* Error if we are not connected to MS-Windows. */
void
check_w32 ()
check_w32 (void)
{
if (! w32_in_use)
error ("MS-Windows not in use or not initialized");
@ -337,7 +337,7 @@ check_w32 ()
You should not call this unless HAVE_MENUS is defined. */
int
have_menus_p ()
have_menus_p (void)
{
return w32_in_use;
}
@ -346,8 +346,7 @@ have_menus_p ()
and checking validity for W32. */
FRAME_PTR
check_x_frame (frame)
Lisp_Object frame;
check_x_frame (Lisp_Object frame)
{
FRAME_PTR f;
@ -365,8 +364,7 @@ check_x_frame (frame)
the first display on the list. */
struct w32_display_info *
check_x_display_info (frame)
Lisp_Object frame;
check_x_display_info (Lisp_Object frame)
{
if (NILP (frame))
{
@ -397,9 +395,7 @@ check_x_display_info (frame)
/* This function can be called during GC, so use GC_xxx type test macros. */
struct frame *
x_window_to_frame (dpyinfo, wdesc)
struct w32_display_info *dpyinfo;
HWND wdesc;
x_window_to_frame (struct w32_display_info *dpyinfo, HWND wdesc)
{
Lisp_Object tail, frame;
struct frame *f;
@ -449,9 +445,7 @@ static void x_edge_detection (struct frame *, struct image *, Lisp_Object,
not Emacs's own window. */
void
x_real_positions (f, xptr, yptr)
FRAME_PTR f;
int *xptr, *yptr;
x_real_positions (FRAME_PTR f, int *xptr, int *yptr)
{
POINT pt;
RECT rect;
@ -790,8 +784,7 @@ DEFUN ("w32-default-color-map", Fw32_default_color_map, Sw32_default_color_map,
}
static Lisp_Object
w32_to_x_color (rgb)
Lisp_Object rgb;
w32_to_x_color (Lisp_Object rgb)
{
Lisp_Object color;
@ -810,8 +803,7 @@ w32_to_x_color (rgb)
}
static Lisp_Object
w32_color_map_lookup (colorname)
char *colorname;
w32_color_map_lookup (char *colorname)
{
Lisp_Object tail, ret = Qnil;
@ -843,8 +835,7 @@ w32_color_map_lookup (colorname)
static void
add_system_logical_colors_to_map (system_colors)
Lisp_Object *system_colors;
add_system_logical_colors_to_map (Lisp_Object *system_colors)
{
HKEY colors_key;
@ -892,8 +883,7 @@ add_system_logical_colors_to_map (system_colors)
static Lisp_Object
x_to_w32_color (colorname)
char * colorname;
x_to_w32_color (char * colorname)
{
register Lisp_Object ret = Qnil;
@ -1204,9 +1194,7 @@ w32_unmap_color (FRAME_PTR f, COLORREF color)
/* Gamma-correct COLOR on frame F. */
void
gamma_correct (f, color)
struct frame *f;
COLORREF *color;
gamma_correct (struct frame *f, COLORREF *color)
{
if (f->gamma)
{
@ -1223,11 +1211,7 @@ gamma_correct (f, color)
If ALLOC is nonzero, allocate a new colormap cell. */
int
w32_defined_color (f, color, color_def, alloc)
FRAME_PTR f;
char *color;
XColor *color_def;
int alloc;
w32_defined_color (FRAME_PTR f, char *color, XColor *color_def, int alloc)
{
register Lisp_Object tem;
COLORREF w32_color_ref;
@ -1299,10 +1283,7 @@ w32_defined_color (f, color, color_def, alloc)
ARG says. */
int
x_decode_color (f, arg, def)
FRAME_PTR f;
Lisp_Object arg;
int def;
x_decode_color (FRAME_PTR f, Lisp_Object arg, int def)
{
XColor cdef;
@ -1336,9 +1317,7 @@ x_decode_color (f, arg, def)
in the standard place; do not attempt to change the window. */
void
x_set_foreground_color (f, arg, oldval)
struct frame *f;
Lisp_Object arg, oldval;
x_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
struct w32_output *x = f->output_data.w32;
PIX_TYPE fg, old_fg;
@ -1359,9 +1338,7 @@ x_set_foreground_color (f, arg, oldval)
}
void
x_set_background_color (f, arg, oldval)
struct frame *f;
Lisp_Object arg, oldval;
x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
FRAME_BACKGROUND_PIXEL (f)
= x_decode_color (f, arg, WHITE_PIX_DEFAULT (f));
@ -1379,9 +1356,7 @@ x_set_background_color (f, arg, oldval)
}
void
x_set_mouse_color (f, arg, oldval)
struct frame *f;
Lisp_Object arg, oldval;
x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
Cursor cursor, nontext_cursor, mode_cursor, hand_cursor;
int count;
@ -1528,9 +1503,7 @@ x_set_mouse_color (f, arg, oldval)
}
void
x_set_cursor_color (f, arg, oldval)
struct frame *f;
Lisp_Object arg, oldval;
x_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
unsigned long fore_pixel, pixel;
@ -1577,9 +1550,7 @@ x_set_cursor_color (f, arg, oldval)
F has a window. */
void
x_set_border_pixel (f, pix)
struct frame *f;
int pix;
x_set_border_pixel (struct frame *f, int pix)
{
f->output_data.w32->border_pixel = pix;
@ -1598,9 +1569,7 @@ x_set_border_pixel (f, pix)
F has a window; it must be redone when the window is created. */
void
x_set_border_color (f, arg, oldval)
struct frame *f;
Lisp_Object arg, oldval;
x_set_border_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
int pix;
@ -1612,9 +1581,7 @@ x_set_border_color (f, arg, oldval)
void
x_set_cursor_type (f, arg, oldval)
FRAME_PTR f;
Lisp_Object arg, oldval;
x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
{
set_frame_cursor_types (f, arg);
@ -1623,9 +1590,7 @@ x_set_cursor_type (f, arg, oldval)
}
void
x_set_icon_type (f, arg, oldval)
struct frame *f;
Lisp_Object arg, oldval;
x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
int result;
@ -1652,9 +1617,7 @@ x_set_icon_type (f, arg, oldval)
}
void
x_set_icon_name (f, arg, oldval)
struct frame *f;
Lisp_Object arg, oldval;
x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
if (STRINGP (arg))
{
@ -1702,9 +1665,7 @@ x_set_icon_name (f, arg, oldval)
void
x_set_menu_bar_lines (f, value, oldval)
struct frame *f;
Lisp_Object value, oldval;
x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
{
int nlines;
int olines = FRAME_MENU_BAR_LINES (f);
@ -1747,9 +1708,7 @@ x_set_menu_bar_lines (f, value, oldval)
The frame's height doesn't change. */
void
x_set_tool_bar_lines (f, value, oldval)
struct frame *f;
Lisp_Object value, oldval;
x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
{
int delta, nlines, root_height;
Lisp_Object root_window;
@ -1829,10 +1788,7 @@ x_set_tool_bar_lines (f, value, oldval)
F->explicit_name is set, ignore the new name; otherwise, set it. */
void
x_set_name (f, name, explicit)
struct frame *f;
Lisp_Object name;
int explicit;
x_set_name (struct frame *f, Lisp_Object name, int explicit)
{
/* Make sure that requests from lisp code override requests from
Emacs redisplay code. */
@ -1887,9 +1843,7 @@ x_set_name (f, name, explicit)
specified a name for the frame; the name will override any set by the
redisplay code. */
void
x_explicitly_set_name (f, arg, oldval)
FRAME_PTR f;
Lisp_Object arg, oldval;
x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
{
x_set_name (f, arg, 1);
}
@ -1898,9 +1852,7 @@ x_explicitly_set_name (f, arg, oldval)
name; names set this way will never override names set by the user's
lisp code. */
void
x_implicitly_set_name (f, arg, oldval)
FRAME_PTR f;
Lisp_Object arg, oldval;
x_implicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
{
x_set_name (f, arg, 0);
}
@ -1909,9 +1861,7 @@ x_implicitly_set_name (f, arg, oldval)
If NAME is nil, use the frame name as the title. */
void
x_set_title (f, name, old_name)
struct frame *f;
Lisp_Object name, old_name;
x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
{
/* Don't change the title if it's already NAME. */
if (EQ (name, f->title))
@ -1936,8 +1886,8 @@ x_set_title (f, name, old_name)
}
void x_set_scroll_bar_default_width (f)
struct frame *f;
void
x_set_scroll_bar_default_width (struct frame *f)
{
int wid = FRAME_COLUMN_WIDTH (f);
@ -1965,11 +1915,10 @@ w32_load_cursor (LPCTSTR name)
return cursor;
}
extern LRESULT CALLBACK w32_wnd_proc ();
extern LRESULT CALLBACK w32_wnd_proc (HWND, UINT, WPARAM, LPARAM);
static BOOL
w32_init_class (hinst)
HINSTANCE hinst;
w32_init_class (HINSTANCE hinst)
{
WNDCLASS wc;
@ -1988,9 +1937,7 @@ w32_init_class (hinst)
}
static HWND
w32_createscrollbar (f, bar)
struct frame *f;
struct scroll_bar * bar;
w32_createscrollbar (struct frame *f, struct scroll_bar * bar)
{
return (CreateWindow ("SCROLLBAR", "", SBS_VERT | WS_CHILD | WS_VISIBLE,
/* Position and size of scroll bar. */
@ -2005,8 +1952,7 @@ w32_createscrollbar (f, bar)
}
static void
w32_createwindow (f)
struct frame *f;
w32_createwindow (struct frame *f)
{
HWND hwnd;
RECT rect;
@ -2076,12 +2022,7 @@ w32_createwindow (f)
}
static void
my_post_msg (wmsg, hwnd, msg, wParam, lParam)
W32Msg * wmsg;
HWND hwnd;
UINT msg;
WPARAM wParam;
LPARAM lParam;
my_post_msg (W32Msg * wmsg, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
wmsg->msg.hwnd = hwnd;
wmsg->msg.message = msg;
@ -2175,7 +2116,7 @@ record_keyup (unsigned int wparam, unsigned int lparam)
it regains focus, be conservative and clear all modifiers since
we cannot reconstruct the left and right modifier state. */
static void
reset_modifiers ()
reset_modifiers (void)
{
SHORT ctrl, alt;
@ -2222,7 +2163,7 @@ reset_modifiers ()
modifier keys, we know that, if no modifiers are set, then neither
the left or right modifier should be set. */
static void
sync_modifiers ()
sync_modifiers (void)
{
if (!modifiers_recorded)
return;
@ -2308,7 +2249,7 @@ w32_key_to_modifier (int key)
}
static unsigned int
w32_get_modifiers ()
w32_get_modifiers (void)
{
return ((modifier_set (VK_SHIFT) ? shift_modifier : 0) |
(modifier_set (VK_CONTROL) ? ctrl_modifier : 0) |
@ -2325,7 +2266,7 @@ w32_get_modifiers ()
and window input. */
static int
construct_console_modifiers ()
construct_console_modifiers (void)
{
int mods;
@ -2397,8 +2338,7 @@ static Lisp_Object w32_grabbed_keys;
combinations like Alt-Tab which are used by the system. */
static void
register_hot_keys (hwnd)
HWND hwnd;
register_hot_keys (HWND hwnd)
{
Lisp_Object keylist;
@ -2417,8 +2357,7 @@ register_hot_keys (hwnd)
}
static void
unregister_hot_keys (hwnd)
HWND hwnd;
unregister_hot_keys (HWND hwnd)
{
Lisp_Object keylist;
@ -2624,7 +2563,7 @@ complete_deferred_msg (HWND hwnd, UINT msg, LRESULT result)
}
static void
cancel_all_deferred_msgs ()
cancel_all_deferred_msgs (void)
{
deferred_msg * item;
@ -2669,7 +2608,7 @@ w32_msg_worker (void *arg)
}
static void
signal_user_input ()
signal_user_input (void)
{
/* Interrupt any lisp that wants to be interrupted by input. */
if (!NILP (Vthrow_on_input))
@ -2687,13 +2626,9 @@ signal_user_input ()
static void
post_character_message (hwnd, msg, wParam, lParam, modifiers)
HWND hwnd;
UINT msg;
WPARAM wParam;
LPARAM lParam;
DWORD modifiers;
post_character_message (HWND hwnd, UINT msg,
WPARAM wParam, LPARAM lParam,
DWORD modifiers)
{
W32Msg wmsg;
@ -2753,11 +2688,7 @@ post_character_message (hwnd, msg, wParam, lParam, modifiers)
/* Main window procedure */
LRESULT CALLBACK
w32_wnd_proc (hwnd, msg, wParam, lParam)
HWND hwnd;
UINT msg;
WPARAM wParam;
LPARAM lParam;
w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
struct frame *f;
struct w32_display_info *dpyinfo = &one_w32_display_info;
@ -4007,8 +3938,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
}
static void
my_create_window (f)
struct frame * f;
my_create_window (struct frame * f)
{
MSG msg;
@ -4023,8 +3953,7 @@ my_create_window (f)
messages for the tooltip. Creating tooltips indirectly also creates
deadlocks when tooltips are created for menu items. */
static void
my_create_tip_window (f)
struct frame *f;
my_create_tip_window (struct frame *f)
{
RECT rect;
@ -4067,10 +3996,7 @@ my_create_tip_window (f)
/* Create and set up the w32 window for frame F. */
static void
w32_window (f, window_prompting, minibuffer_only)
struct frame *f;
long window_prompting;
int minibuffer_only;
w32_window (struct frame *f, long window_prompting, int minibuffer_only)
{
BLOCK_INPUT;
@ -4118,9 +4044,7 @@ w32_window (f, window_prompting, minibuffer_only)
well. */
static void
x_icon (f, parms)
struct frame *f;
Lisp_Object parms;
x_icon (struct frame *f, Lisp_Object parms)
{
Lisp_Object icon_x, icon_y;
struct w32_display_info *dpyinfo = &one_w32_display_info;
@ -4159,8 +4083,7 @@ x_icon (f, parms)
static void
x_make_gc (f)
struct frame *f;
x_make_gc (struct frame *f)
{
XGCValues gc_values;
@ -4193,8 +4116,7 @@ x_make_gc (f)
constructed. */
static Lisp_Object
unwind_create_frame (frame)
Lisp_Object frame;
unwind_create_frame (Lisp_Object frame)
{
struct frame *f = XFRAME (frame);
@ -4219,9 +4141,7 @@ unwind_create_frame (frame)
}
static void
x_default_font_parameter (f, parms)
struct frame *f;
Lisp_Object parms;
x_default_font_parameter (struct frame *f, Lisp_Object parms)
{
struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL,
@ -4587,8 +4507,7 @@ This function is an internal primitive--use `make-frame' instead. */)
display info directly because we're called from frame.c, which doesn't
know about that structure. */
Lisp_Object
x_get_focus_frame (frame)
struct frame *frame;
x_get_focus_frame (struct frame *frame)
{
struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (frame);
Lisp_Object xfocus;
@ -4899,36 +4818,31 @@ If omitted or nil, that stands for the selected frame's display. */)
}
int
x_pixel_width (f)
register struct frame *f;
x_pixel_width (register struct frame *f)
{
return FRAME_PIXEL_WIDTH (f);
}
int
x_pixel_height (f)
register struct frame *f;
x_pixel_height (register struct frame *f)
{
return FRAME_PIXEL_HEIGHT (f);
}
int
x_char_width (f)
register struct frame *f;
x_char_width (register struct frame *f)
{
return FRAME_COLUMN_WIDTH (f);
}
int
x_char_height (f)
register struct frame *f;
x_char_height (register struct frame *f)
{
return FRAME_LINE_HEIGHT (f);
}
int
x_screen_planes (f)
register struct frame *f;
x_screen_planes (register struct frame *f)
{
return FRAME_W32_DISPLAY_INFO (f)->n_planes;
}
@ -4937,8 +4851,7 @@ x_screen_planes (f)
Open a new connection if necessary. */
struct w32_display_info *
x_display_info_for_name (name)
Lisp_Object name;
x_display_info_for_name (Lisp_Object name)
{
Lisp_Object names;
struct w32_display_info *dpyinfo;
@ -5253,7 +5166,7 @@ extern Lisp_Object Vhourglass_delay;
xdisp.c could be used. */
int
hourglass_started ()
hourglass_started (void)
{
return hourglass_shown_p || hourglass_timer;
}
@ -5261,7 +5174,7 @@ hourglass_started ()
/* Cancel a currently active hourglass timer, and start a new one. */
void
start_hourglass ()
start_hourglass (void)
{
DWORD delay;
int secs, msecs = 0;
@ -5297,7 +5210,7 @@ start_hourglass ()
cursor if shown. */
void
cancel_hourglass ()
cancel_hourglass (void)
{
if (hourglass_timer)
{
@ -5316,8 +5229,7 @@ cancel_hourglass ()
to indicate that an hourglass cursor is shown. */
static void
w32_show_hourglass (f)
struct frame *f;
w32_show_hourglass (struct frame *f)
{
if (!hourglass_shown_p)
{
@ -5332,7 +5244,7 @@ w32_show_hourglass (f)
/* Hide the hourglass cursor on all frames, if it is currently shown. */
static void
w32_hide_hourglass ()
w32_hide_hourglass (void)
{
if (hourglass_shown_p)
{
@ -5386,8 +5298,7 @@ Lisp_Object Vx_max_tooltip_size;
static Lisp_Object
unwind_create_tip_frame (frame)
Lisp_Object frame;
unwind_create_tip_frame (Lisp_Object frame)
{
Lisp_Object deleted;
@ -5412,9 +5323,8 @@ unwind_create_tip_frame (frame)
when this happens. */
static Lisp_Object
x_create_tip_frame (dpyinfo, parms, text)
struct w32_display_info *dpyinfo;
Lisp_Object parms, text;
x_create_tip_frame (struct w32_display_info *dpyinfo,
Lisp_Object parms, Lisp_Object text)
{
struct frame *f;
Lisp_Object frame, tem;
@ -5654,11 +5564,9 @@ x_create_tip_frame (dpyinfo, parms, text)
the display in *ROOT_X, and *ROOT_Y. */
static void
compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y)
struct frame *f;
Lisp_Object parms, dx, dy;
int width, height;
int *root_x, *root_y;
compute_tip_xy (struct frame *f,
Lisp_Object parms, Lisp_Object dx, Lisp_Object dy,
int width, int height, int *root_x, int *root_y)
{
Lisp_Object left, top;
int min_x, min_y, max_x, max_y;
@ -6037,11 +5945,7 @@ extern Lisp_Object Qfile_name_history;
allows us to work around the fact that the standard Open File
dialog does not support directories. */
UINT CALLBACK
file_dialog_callback (hwnd, msg, wParam, lParam)
HWND hwnd;
UINT msg;
WPARAM wParam;
LPARAM lParam;
file_dialog_callback (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
if (msg == WM_NOTIFY)
{
@ -6395,8 +6299,7 @@ lookup_vk_code (char *key)
/* Convert a one-element vector style key sequence to a hot key
definition. */
static Lisp_Object
w32_parse_hot_key (key)
Lisp_Object key;
w32_parse_hot_key (Lisp_Object key)
{
/* Copied from Fdefine_key and store_in_keymap. */
register Lisp_Object c;
@ -6625,7 +6528,7 @@ DEFUN ("w32-window-exists-p", Fw32_window_exists_p, Sw32_window_exists_p,
This is a direct interface to the Windows API FindWindow function. */)
(class, name)
Lisp_Object class, name;
Lisp_Object class, name;
{
HWND hnd;
@ -6963,7 +6866,7 @@ frame_parm_handler w32_frame_parm_handlers[] =
};
void
syms_of_w32fns ()
syms_of_w32fns (void)
{
globals_of_w32fns ();
/* This is zero if not using MS-Windows. */
@ -7320,7 +7223,7 @@ only be necessary if the default setting causes problems. */);
is non zero.
*/
void
globals_of_w32fns ()
globals_of_w32fns (void)
{
HMODULE user32_lib = GetModuleHandle ("user32.dll");
/*
@ -7363,7 +7266,7 @@ globals_of_w32fns ()
#undef abort
void
w32_abort ()
w32_abort (void)
{
int button;
button = MessageBox (NULL,
@ -7391,7 +7294,7 @@ w32_abort ()
/* For convenience when debugging. */
int
w32_last_error ()
w32_last_error (void)
{
return GetLastError ();
}

View file

@ -153,8 +153,7 @@ static void list_all_matching_fonts (struct font_callback_data *);
static int
memq_no_quit (elt, list)
Lisp_Object elt, list;
memq_no_quit (Lisp_Object elt, Lisp_Object list)
{
while (CONSP (list) && ! EQ (XCAR (list), elt))
list = XCDR (list);
@ -162,8 +161,7 @@ memq_no_quit (elt, list)
}
Lisp_Object
intern_font_name (string)
char * string;
intern_font_name (char * string)
{
Lisp_Object obarray, tem, str;
int len;
@ -185,8 +183,7 @@ intern_font_name (string)
Return a cache of font-entities on FRAME. The cache must be a
cons whose cdr part is the actual cache area. */
Lisp_Object
w32font_get_cache (f)
FRAME_PTR f;
w32font_get_cache (FRAME_PTR f)
{
struct w32_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
@ -198,8 +195,7 @@ w32font_get_cache (f)
is a vector of font-entities. This is the sole API that
allocates font-entities. */
static Lisp_Object
w32font_list (frame, font_spec)
Lisp_Object frame, font_spec;
w32font_list (Lisp_Object frame, Lisp_Object font_spec)
{
Lisp_Object fonts = w32font_list_internal (frame, font_spec, 0);
FONT_ADD_LOG ("w32font-list", font_spec, fonts);
@ -211,8 +207,7 @@ w32font_list (frame, font_spec)
FRAME. The closeness is detemined by the font backend, thus
`face-font-selection-order' is ignored here. */
static Lisp_Object
w32font_match (frame, font_spec)
Lisp_Object frame, font_spec;
w32font_match (Lisp_Object frame, Lisp_Object font_spec)
{
Lisp_Object entity = w32font_match_internal (frame, font_spec, 0);
FONT_ADD_LOG ("w32font-match", font_spec, entity);
@ -223,8 +218,7 @@ w32font_match (frame, font_spec)
List available families. The value is a list of family names
(symbols). */
static Lisp_Object
w32font_list_family (frame)
Lisp_Object frame;
w32font_list_family (Lisp_Object frame)
{
Lisp_Object list = Qnil;
LOGFONT font_match_pattern;
@ -248,10 +242,7 @@ w32font_list_family (frame)
Open a font specified by FONT_ENTITY on frame F.
If the font is scalable, open it with PIXEL_SIZE. */
static Lisp_Object
w32font_open (f, font_entity, pixel_size)
FRAME_PTR f;
Lisp_Object font_entity;
int pixel_size;
w32font_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size)
{
Lisp_Object font_object
= font_make_object (VECSIZE (struct w32font_info),
@ -275,9 +266,7 @@ w32font_open (f, font_entity, pixel_size)
/* w32 implementation of close for font_backend.
Close FONT on frame F. */
void
w32font_close (f, font)
FRAME_PTR f;
struct font *font;
w32font_close (FRAME_PTR f, struct font *font)
{
int i;
struct w32font_info *w32_font = (struct w32font_info *) font;
@ -303,9 +292,7 @@ w32font_close (f, font)
return 1. If not, return 0. If a font must be opened to check
it, return -1. */
int
w32font_has_char (entity, c)
Lisp_Object entity;
int c;
w32font_has_char (Lisp_Object entity, int c)
{
/* We can't be certain about which characters a font will support until
we open it. Checking the scripts that the font supports turns out
@ -354,9 +341,7 @@ w32font_has_char (entity, c)
which characters are not supported by the font.
*/
static unsigned
w32font_encode_char (font, c)
struct font *font;
int c;
w32font_encode_char (struct font *font, int c)
{
struct w32font_info * w32_font = (struct w32font_info *)font;
@ -373,11 +358,8 @@ w32font_encode_char (font, c)
CODE (length NGLYPHS). Apparently metrics can be NULL, in this
case just return the overall width. */
int
w32font_text_extents (font, code, nglyphs, metrics)
struct font *font;
unsigned *code;
int nglyphs;
struct font_metrics *metrics;
w32font_text_extents (struct font *font, unsigned *code,
int nglyphs, struct font_metrics *metrics)
{
int i;
HFONT old_font = NULL;
@ -552,9 +534,8 @@ w32font_text_extents (font, code, nglyphs, metrics)
*/
int
w32font_draw (s, from, to, x, y, with_background)
struct glyph_string *s;
int from, to, x, y, with_background;
w32font_draw (struct glyph_string *s, int from, int to,
int x, int y, int with_background)
{
UINT options;
HRGN orig_clip = NULL;
@ -715,9 +696,7 @@ w32font_otf_drive (struct font *font, Lisp_Object features,
Additional parameter opentype_only restricts the returned fonts to
opentype fonts, which can be used with the Uniscribe backend. */
Lisp_Object
w32font_list_internal (frame, font_spec, opentype_only)
Lisp_Object frame, font_spec;
int opentype_only;
w32font_list_internal (Lisp_Object frame, Lisp_Object font_spec, int opentype_only)
{
struct font_callback_data match_data;
HDC dc;
@ -770,9 +749,7 @@ w32font_list_internal (frame, font_spec, opentype_only)
Additional parameter opentype_only restricts the returned fonts to
opentype fonts, which can be used with the Uniscribe backend. */
Lisp_Object
w32font_match_internal (frame, font_spec, opentype_only)
Lisp_Object frame, font_spec;
int opentype_only;
w32font_match_internal (Lisp_Object frame, Lisp_Object font_spec, int opentype_only)
{
struct font_callback_data match_data;
HDC dc;
@ -800,11 +777,8 @@ w32font_match_internal (frame, font_spec, opentype_only)
}
int
w32font_open_internal (f, font_entity, pixel_size, font_object)
FRAME_PTR f;
Lisp_Object font_entity;
int pixel_size;
Lisp_Object font_object;
w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity,
int pixel_size, Lisp_Object font_object)
{
int len, size, i;
LOGFONT logfont;
@ -951,11 +925,9 @@ w32font_open_internal (f, font_entity, pixel_size, font_object)
/* Callback function for EnumFontFamiliesEx.
* Adds the name of a font to a Lisp list (passed in as the lParam arg). */
static int CALLBACK
add_font_name_to_list (logical_font, physical_font, font_type, list_object)
ENUMLOGFONTEX *logical_font;
NEWTEXTMETRICEX *physical_font;
DWORD font_type;
LPARAM list_object;
add_font_name_to_list (ENUMLOGFONTEX *logical_font,
NEWTEXTMETRICEX *physical_font,
DWORD font_type, LPARAM list_object)
{
Lisp_Object* list = (Lisp_Object *) list_object;
Lisp_Object family;
@ -976,14 +948,12 @@ static int w32_encode_weight (int);
/* Convert an enumerated Windows font to an Emacs font entity. */
static Lisp_Object
w32_enumfont_pattern_entity (frame, logical_font, physical_font,
font_type, requested_font, backend)
Lisp_Object frame;
ENUMLOGFONTEX *logical_font;
NEWTEXTMETRICEX *physical_font;
DWORD font_type;
LOGFONT *requested_font;
Lisp_Object backend;
w32_enumfont_pattern_entity (Lisp_Object frame,
ENUMLOGFONTEX *logical_font,
NEWTEXTMETRICEX *physical_font,
DWORD font_type,
LOGFONT *requested_font,
Lisp_Object backend)
{
Lisp_Object entity, tem;
LOGFONT *lf = (LOGFONT*) logical_font;
@ -1107,8 +1077,7 @@ w32_generic_family (Lisp_Object name)
}
static int
logfonts_match (font, pattern)
LOGFONT *font, *pattern;
logfonts_match (LOGFONT *font, LOGFONT *pattern)
{
/* Only check height for raster fonts. */
if (pattern->lfHeight && font->lfOutPrecision == OUT_STRING_PRECIS
@ -1132,12 +1101,9 @@ logfonts_match (font, pattern)
#define CSB_CHINESE ((1 << 18) | (1 << 20))
static int
font_matches_spec (type, font, spec, backend, logfont)
DWORD type;
NEWTEXTMETRICEX *font;
Lisp_Object spec;
Lisp_Object backend;
LOGFONT *logfont;
font_matches_spec (DWORD type, NEWTEXTMETRICEX *font,
Lisp_Object spec, Lisp_Object backend,
LOGFONT *logfont)
{
Lisp_Object extra, val;
@ -1322,9 +1288,7 @@ font_matches_spec (type, font, spec, backend, logfont)
}
static int
w32font_coverage_ok (coverage, charset)
FONTSIGNATURE * coverage;
BYTE charset;
w32font_coverage_ok (FONTSIGNATURE * coverage, BYTE charset)
{
DWORD subrange1 = coverage->fsUsb[1];
@ -1350,9 +1314,7 @@ w32font_coverage_ok (coverage, charset)
static int
check_face_name (font, full_name)
LOGFONT *font;
char *full_name;
check_face_name (LOGFONT *font, char *full_name)
{
char full_iname[LF_FULLFACESIZE+1];
@ -1397,11 +1359,9 @@ check_face_name (font, full_name)
* and the list to which the fonts are added are passed in via the
* lparam argument, in the form of a font_callback_data struct. */
static int CALLBACK
add_font_entity_to_list (logical_font, physical_font, font_type, lParam)
ENUMLOGFONTEX *logical_font;
NEWTEXTMETRICEX *physical_font;
DWORD font_type;
LPARAM lParam;
add_font_entity_to_list (ENUMLOGFONTEX *logical_font,
NEWTEXTMETRICEX *physical_font,
DWORD font_type, LPARAM lParam)
{
struct font_callback_data *match_data
= (struct font_callback_data *) lParam;
@ -1510,11 +1470,9 @@ add_font_entity_to_list (logical_font, physical_font, font_type, lParam)
/* Callback function for EnumFontFamiliesEx.
* Terminates the search once we have a match. */
static int CALLBACK
add_one_font_entity_to_list (logical_font, physical_font, font_type, lParam)
ENUMLOGFONTEX *logical_font;
NEWTEXTMETRICEX *physical_font;
DWORD font_type;
LPARAM lParam;
add_one_font_entity_to_list (ENUMLOGFONTEX *logical_font,
NEWTEXTMETRICEX *physical_font,
DWORD font_type, LPARAM lParam)
{
struct font_callback_data *match_data
= (struct font_callback_data *) lParam;
@ -1526,8 +1484,7 @@ add_one_font_entity_to_list (logical_font, physical_font, font_type, lParam)
/* Old function to convert from x to w32 charset, from w32fns.c. */
static LONG
x_to_w32_charset (lpcs)
char * lpcs;
x_to_w32_charset (char * lpcs)
{
Lisp_Object this_entry, w32_charset;
char *charset;
@ -1609,8 +1566,7 @@ x_to_w32_charset (lpcs)
/* Convert a Lisp font registry (symbol) to a windows charset. */
static LONG
registry_to_w32_charset (charset)
Lisp_Object charset;
registry_to_w32_charset (Lisp_Object charset)
{
if (EQ (charset, Qiso10646_1) || EQ (charset, Qunicode_bmp)
|| EQ (charset, Qunicode_sip))
@ -1625,9 +1581,7 @@ registry_to_w32_charset (charset)
/* Old function to convert from w32 to x charset, from w32fns.c. */
static char *
w32_to_x_charset (fncharset, matching)
int fncharset;
char *matching;
w32_to_x_charset (int fncharset, char *matching)
{
static char buf[32];
Lisp_Object charset_type;
@ -1821,9 +1775,7 @@ w32_to_x_charset (fncharset, matching)
}
static Lisp_Object
w32_registry (w32_charset, font_type)
LONG w32_charset;
DWORD font_type;
w32_registry (LONG w32_charset, DWORD font_type)
{
char *charset;
@ -1837,8 +1789,7 @@ w32_registry (w32_charset, font_type)
}
static int
w32_decode_weight (fnweight)
int fnweight;
w32_decode_weight (int fnweight)
{
if (fnweight >= FW_HEAVY) return 210;
if (fnweight >= FW_EXTRABOLD) return 205;
@ -1852,8 +1803,7 @@ w32_decode_weight (fnweight)
}
static int
w32_encode_weight (n)
int n;
w32_encode_weight (int n)
{
if (n >= 210) return FW_HEAVY;
if (n >= 205) return FW_EXTRABOLD;
@ -1869,8 +1819,7 @@ w32_encode_weight (n)
/* Convert a Windows font weight into one of the weights supported
by fontconfig (see font.c:font_parse_fcname). */
static Lisp_Object
w32_to_fc_weight (n)
int n;
w32_to_fc_weight (int n)
{
if (n >= FW_EXTRABOLD) return intern ("black");
if (n >= FW_BOLD) return intern ("bold");
@ -1881,10 +1830,7 @@ w32_to_fc_weight (n)
/* Fill in all the available details of LOGFONT from FONT_SPEC. */
static void
fill_in_logfont (f, logfont, font_spec)
FRAME_PTR f;
LOGFONT *logfont;
Lisp_Object font_spec;
fill_in_logfont (FRAME_PTR f, LOGFONT *logfont, Lisp_Object font_spec)
{
Lisp_Object tmp, extra;
int dpi = FRAME_W32_DISPLAY_INFO (f)->resy;
@ -2029,8 +1975,7 @@ fill_in_logfont (f, logfont, font_spec)
}
static void
list_all_matching_fonts (match_data)
struct font_callback_data *match_data;
list_all_matching_fonts (struct font_callback_data *match_data)
{
HDC dc;
Lisp_Object families = w32font_list_family (match_data->frame);
@ -2066,8 +2011,7 @@ list_all_matching_fonts (match_data)
}
static Lisp_Object
lispy_antialias_type (type)
BYTE type;
lispy_antialias_type (BYTE type)
{
Lisp_Object lispy;
@ -2094,8 +2038,7 @@ lispy_antialias_type (type)
/* Convert antialiasing symbols to lfQuality */
static BYTE
w32_antialias_type (type)
Lisp_Object type;
w32_antialias_type (Lisp_Object type)
{
if (EQ (type, Qnone))
return NONANTIALIASED_QUALITY;
@ -2241,12 +2184,8 @@ font_supported_scripts (FONTSIGNATURE * sig)
The full name is in fcname format, with weight, slant and antialiasing
specified if they are not "normal". */
static int
w32font_full_name (font, font_obj, pixel_size, name, nbytes)
LOGFONT * font;
Lisp_Object font_obj;
int pixel_size;
char *name;
int nbytes;
w32font_full_name (LOGFONT * font, Lisp_Object font_obj,
int pixel_size, char *name, int nbytes)
{
int len, height, outline;
char *p;
@ -2317,11 +2256,8 @@ w32font_full_name (font, font_obj, pixel_size, name, nbytes)
is written. If the buffer is not large enough to contain the name,
the function returns -1, otherwise it returns the number of bytes
written to FCNAME. */
static int logfont_to_fcname(font, pointsize, fcname, size)
LOGFONT* font;
int pointsize;
char *fcname;
int size;
static int
logfont_to_fcname (LOGFONT* font, int pointsize, char *fcname, int size)
{
int len, height;
char *p = fcname;
@ -2360,11 +2296,8 @@ static int logfont_to_fcname(font, pointsize, fcname, size)
}
static void
compute_metrics (dc, w32_font, code, metrics)
HDC dc;
struct w32font_info *w32_font;
unsigned int code;
struct w32_metric_cache *metrics;
compute_metrics (HDC dc, struct w32font_info *w32_font, unsigned int code,
struct w32_metric_cache *metrics)
{
GLYPHMETRICS gm;
MAT2 transform;
@ -2482,7 +2415,7 @@ struct font_driver w32font_driver =
/* Initialize state that does not change between invocations. This is only
called when Emacs is dumped. */
void
syms_of_w32font ()
syms_of_w32font (void)
{
DEFSYM (Qgdi, "gdi");
DEFSYM (Quniscribe, "uniscribe");

View file

@ -222,7 +222,7 @@ sbrk (unsigned long increment)
was allocated by something else; GNU malloc detects when there is a
jump in the sbrk values, and starts a new heap block. */
void
init_heap ()
init_heap (void)
{
PIMAGE_DOS_HEADER dos_header;
PIMAGE_NT_HEADERS nt_header;

View file

@ -684,7 +684,7 @@ resize_event (WINDOW_BUFFER_SIZE_RECORD *event)
}
static void
maybe_generate_resize_event ()
maybe_generate_resize_event (void)
{
CONSOLE_SCREEN_BUFFER_INFO info;
FRAME_PTR f = get_frame ();

View file

@ -59,8 +59,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
HMENU current_popup_menu;
void syms_of_w32menu ();
void globals_of_w32menu ();
void syms_of_w32menu (void);
void globals_of_w32menu (void);
typedef BOOL (WINAPI * GetMenuItemInfoA_Proc) (
IN HMENU,
@ -116,8 +116,7 @@ int pending_menu_activation;
ID, or 0 if none. */
static struct frame *
menubar_id_to_frame (id)
HMENU id;
menubar_id_to_frame (HMENU id)
{
Lisp_Object tail, frame;
FRAME_PTR f;
@ -276,8 +275,7 @@ otherwise it is "Question". */)
This way we can safely execute Lisp code. */
void
x_activate_menubar (f)
FRAME_PTR f;
x_activate_menubar (FRAME_PTR f)
{
set_frame_menubar (f, 0, 1);
@ -386,10 +384,7 @@ menubar_selection_callback (FRAME_PTR f, void * client_data)
it is set the first time this is called, from initialize_frame_menubar. */
void
set_frame_menubar (f, first_time, deep_p)
FRAME_PTR f;
int first_time;
int deep_p;
set_frame_menubar (FRAME_PTR f, int first_time, int deep_p)
{
HMENU menubar_widget = f->output_data.w32->menubar_widget;
Lisp_Object items;
@ -648,8 +643,7 @@ set_frame_menubar (f, first_time, deep_p)
is visible. */
void
initialize_frame_menubar (f)
FRAME_PTR f;
initialize_frame_menubar (FRAME_PTR f)
{
/* This function is called before the first chance to redisplay
the frame. It has to be, so the frame will have the right size. */
@ -661,8 +655,7 @@ initialize_frame_menubar (f)
This is used when deleting a frame, and when turning off the menu bar. */
void
free_frame_menubar (f)
FRAME_PTR f;
free_frame_menubar (FRAME_PTR f)
{
BLOCK_INPUT;
@ -1020,11 +1013,9 @@ static char * button_names [] = {
"button6", "button7", "button8", "button9", "button10" };
static Lisp_Object
w32_dialog_show (f, keymaps, title, header, error)
FRAME_PTR f;
int keymaps;
Lisp_Object title, header;
char **error;
w32_dialog_show (FRAME_PTR f, int keymaps,
Lisp_Object title, Lisp_Object header,
char **error)
{
int i, nb_buttons=0;
char dialog_name[6];
@ -1213,8 +1204,8 @@ w32_dialog_show (f, keymaps, title, header, error)
anywhere in Emacs that uses the other specific dialog choices that
MessageBox provides. */
static int is_simple_dialog (contents)
Lisp_Object contents;
static int
is_simple_dialog (Lisp_Object contents)
{
Lisp_Object options = XCDR (contents);
Lisp_Object name, yes, no, other;
@ -1249,9 +1240,8 @@ static int is_simple_dialog (contents)
return !(CONSP (options));
}
static Lisp_Object simple_dialog_show (f, contents, header)
FRAME_PTR f;
Lisp_Object contents, header;
static Lisp_Object
simple_dialog_show (FRAME_PTR f, Lisp_Object contents, Lisp_Object header)
{
int answer;
UINT type;
@ -1315,8 +1305,7 @@ static Lisp_Object simple_dialog_show (f, contents, header)
/* Is this item a separator? */
static int
name_is_separator (name)
char *name;
name_is_separator (char *name)
{
char *start = name;
@ -1647,8 +1636,7 @@ w32_menu_display_help (HWND owner, HMENU menu, UINT item, UINT flags)
/* Free memory used by owner-drawn strings. */
static void
w32_free_submenu_strings (menu)
HMENU menu;
w32_free_submenu_strings (HMENU menu)
{
int i, num = GetMenuItemCount (menu);
for (i = 0; i < num; i++)
@ -1676,8 +1664,7 @@ w32_free_submenu_strings (menu)
}
void
w32_free_menu_strings (hwnd)
HWND hwnd;
w32_free_menu_strings (HWND hwnd)
{
HMENU menu = current_popup_menu;
@ -1712,7 +1699,8 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_
#endif /* HAVE_MENUS */
}
void syms_of_w32menu ()
void
syms_of_w32menu (void)
{
globals_of_w32menu ();
@ -1734,7 +1722,8 @@ void syms_of_w32menu ()
variable initialized is 0 and directly from main when initialized
is non zero.
*/
void globals_of_w32menu ()
void
globals_of_w32menu (void)
{
/* See if Get/SetMenuItemInfo functions are available. */
HMODULE user32 = GetModuleHandle ("user32.dll");

View file

@ -117,7 +117,8 @@ extern Lisp_Object Qlocal;
Lisp_Object Qhigh, Qlow;
#ifdef EMACSDEBUG
void _DebPrint (const char *fmt, ...)
void
_DebPrint (const char *fmt, ...)
{
char buf[1024];
va_list args;
@ -608,7 +609,10 @@ get_result:
#endif
void
w32_executable_type (char * filename, int * is_dos_app, int * is_cygnus_app, int * is_gui_app)
w32_executable_type (char * filename,
int * is_dos_app,
int * is_cygnus_app,
int * is_gui_app)
{
file_data executable;
char * p;
@ -1875,7 +1879,8 @@ If successful, the return value is t, otherwise nil. */)
#ifdef HAVE_LANGINFO_CODESET
/* Emulation of nl_langinfo. Used in fns.c:Flocale_info. */
char *nl_langinfo (nl_item item)
char *
nl_langinfo (nl_item item)
{
/* Conversion of Posix item numbers to their Windows equivalents. */
static const LCTYPE w32item[] = {
@ -2003,7 +2008,8 @@ human-readable form. */)
return make_number (GetThreadLocale ());
}
DWORD int_from_hex (char * s)
DWORD
int_from_hex (char * s)
{
DWORD val = 0;
static char hex[] = "0123456789abcdefABCDEF";
@ -2024,7 +2030,8 @@ DWORD int_from_hex (char * s)
function isn't given a context pointer. */
Lisp_Object Vw32_valid_locale_ids;
BOOL CALLBACK enum_locale_fn (LPTSTR localeNum)
BOOL CALLBACK
enum_locale_fn (LPTSTR localeNum)
{
DWORD id = int_from_hex (localeNum);
Vw32_valid_locale_ids = Fcons (make_number (id), Vw32_valid_locale_ids);
@ -2089,7 +2096,8 @@ If successful, the new locale id is returned, otherwise nil. */)
function isn't given a context pointer. */
Lisp_Object Vw32_valid_codepages;
BOOL CALLBACK enum_codepage_fn (LPTSTR codepageNum)
BOOL CALLBACK
enum_codepage_fn (LPTSTR codepageNum)
{
DWORD id = atoi (codepageNum);
Vw32_valid_codepages = Fcons (make_number (id), Vw32_valid_codepages);
@ -2265,7 +2273,8 @@ If successful, the new layout id is returned, otherwise nil. */)
}
syms_of_ntproc ()
void
syms_of_ntproc (void)
{
DEFSYM (Qhigh, "high");
DEFSYM (Qlow, "low");

View file

@ -58,9 +58,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
*/
static char *
w32_get_rdb_resource (rdb, resource)
char *rdb;
char *resource;
w32_get_rdb_resource (char *rdb, char *resource)
{
char *value = rdb;
int len = strlen (resource);
@ -78,9 +76,7 @@ w32_get_rdb_resource (rdb, resource)
}
static LPBYTE
w32_get_string_resource (name, class, dwexptype)
char *name, *class;
DWORD dwexptype;
w32_get_string_resource (char *name, char *class, DWORD dwexptype)
{
LPBYTE lpvalue = NULL;
HKEY hrootkey = NULL;
@ -147,9 +143,7 @@ w32_get_string_resource (name, class, dwexptype)
database RDB. */
char *
x_get_string_resource (rdb, name, class)
XrmDatabase rdb;
char *name, *class;
x_get_string_resource (XrmDatabase rdb, char *name, char *class)
{
if (rdb)
{

View file

@ -30,7 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
* (CF_UNICODETEXT), when a well-known console codepage is given, they
* apply to the console version of the clipboard data (CF_OEMTEXT),
* else they apply to the normal 8-bit text clipboard (CF_TEXT).
*
*
* When pasting (getting data from the OS), the clipboard format that
* matches the {next-}selection-coding-system is retrieved. If
* 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/>. */
*
* Scenarios to use the facilities for customizing the selection
* coding system are:
*
*
* ;; Generally use KOI8-R instead of the russian MS codepage for
* ;; the 8-bit clipboard.
* (set-selection-coding-system 'koi8-r-dos)
*
*
* Or
*
*
* ;; Create a special clipboard copy function that uses codepage
* ;; 1253 (Greek) to copy Greek text to a specific non-Unicode
* ;; application.
@ -71,7 +71,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
* types should be supported is also moved to Lisp, functionality
* could be expanded to CF_HTML, CF_RTF and maybe other types.
*/
#include <config.h>
#include <setjmp.h>
#include "lisp.h"
@ -89,8 +89,8 @@ static HGLOBAL convert_to_handle_as_ascii (void);
static HGLOBAL convert_to_handle_as_coded (Lisp_Object coding_system);
static Lisp_Object render (Lisp_Object oformat);
static Lisp_Object render_locale (void);
static Lisp_Object render_all (void);
static void run_protected (Lisp_Object (*code) (), Lisp_Object arg);
static Lisp_Object render_all (Lisp_Object ignore);
static void run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg);
static Lisp_Object lisp_error_handler (Lisp_Object error);
static LRESULT CALLBACK owner_callback (HWND win, UINT msg,
WPARAM wp, LPARAM lp);
@ -220,7 +220,7 @@ convert_to_handle_as_coded (Lisp_Object coding_system)
unsigned char *dst = NULL;
struct coding_system coding;
ONTRACE (fprintf (stderr, "convert_to_handle_as_coded: %s\n",
ONTRACE (fprintf (stderr, "convert_to_handle_as_coded: %s\n",
SDATA (SYMBOL_NAME (coding_system))));
setup_windows_coding_system (coding_system, &coding);
@ -334,7 +334,7 @@ render_locale (void)
data survives us. This code will do that. */
static Lisp_Object
render_all (void)
render_all (Lisp_Object ignore)
{
ONTRACE (fprintf (stderr, "render_all\n"));
@ -392,7 +392,7 @@ render_all (void)
}
static void
run_protected (Lisp_Object (*code) (), Lisp_Object arg)
run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg)
{
/* FIXME: This works but it doesn't feel right. Too much fiddling
with global variables and calling strange looking functions. Is
@ -514,7 +514,7 @@ setup_config (void)
&& EQ (cfg_coding_system, dos_coding_system))
return;
cfg_coding_system = dos_coding_system;
/* Set some sensible fallbacks */
cfg_codepage = ANSICP;
cfg_lcid = LOCALE_NEUTRAL;
@ -583,7 +583,7 @@ enum_locale_callback (/*const*/ char* loc_string)
cfg_clipboard_type = CF_TEXT;
return FALSE; /* Stop enumeration */
}
/* Is the wanted codepage the OEM codepage for this locale? */
codepage = cp_from_locale (lcid, CF_OEMTEXT);
if (codepage == cfg_codepage)
@ -704,7 +704,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
current_lcid = cfg_lcid;
current_num_nls = 0;
current_requires_encoding = 0;
BLOCK_INPUT;
/* 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,
struct coding_system coding;
Lisp_Object coding_system = Qnil;
Lisp_Object dos_coding_system;
/* `next-selection-coding-system' should override everything,
even when the locale passed by the system disagrees. The
only exception is when `next-selection-coding-system'
@ -1065,7 +1065,7 @@ and t is the same as `SECONDARY'. */)
dumped version. */
void
syms_of_w32select ()
syms_of_w32select (void)
{
defsubr (&Sw32_set_clipboard_data);
defsubr (&Sw32_get_clipboard_data);
@ -1076,7 +1076,7 @@ syms_of_w32select ()
When sending or receiving text via cut_buffer, selection, and
clipboard, the text is encoded or decoded by this coding system.
The default value is the current system default encoding on 9x/Me and
`utf-16le-dos' (Unicode) on NT/W2K/XP. */);
`utf-16le-dos' (Unicode) on NT/W2K/XP. */);
/* The actual value is set dynamically in the dumped Emacs, see
below. */
Vselection_coding_system = Qnil;
@ -1104,7 +1104,7 @@ set to nil. */);
un-dumped version. */
void
globals_of_w32select ()
globals_of_w32select (void)
{
DEFAULT_LCID = GetUserDefaultLCID ();
/* Drop the sort order from the LCID, so we can compare this with

File diff suppressed because it is too large Load diff

View file

@ -64,8 +64,7 @@ static int CALLBACK add_opentype_font_name_to_list (ENUMLOGFONTEX *,
static Lisp_Object otf_features (HDC context, char *table);
static int
memq_no_quit (elt, list)
Lisp_Object elt, list;
memq_no_quit (Lisp_Object elt, Lisp_Object list)
{
while (CONSP (list) && ! EQ (XCAR (list), elt))
list = XCDR (list);
@ -75,8 +74,7 @@ memq_no_quit (elt, list)
/* Font backend interface implementation. */
static Lisp_Object
uniscribe_list (frame, font_spec)
Lisp_Object frame, font_spec;
uniscribe_list (Lisp_Object frame, Lisp_Object font_spec)
{
Lisp_Object fonts = w32font_list_internal (frame, font_spec, 1);
FONT_ADD_LOG ("uniscribe-list", font_spec, fonts);
@ -84,8 +82,7 @@ uniscribe_list (frame, font_spec)
}
static Lisp_Object
uniscribe_match (frame, font_spec)
Lisp_Object frame, font_spec;
uniscribe_match (Lisp_Object frame, Lisp_Object font_spec)
{
Lisp_Object entity = w32font_match_internal (frame, font_spec, 1);
FONT_ADD_LOG ("uniscribe-match", font_spec, entity);
@ -93,8 +90,7 @@ uniscribe_match (frame, font_spec)
}
static Lisp_Object
uniscribe_list_family (frame)
Lisp_Object frame;
uniscribe_list_family (Lisp_Object frame)
{
Lisp_Object list = Qnil;
LOGFONT font_match_pattern;
@ -116,10 +112,7 @@ uniscribe_list_family (frame)
}
static Lisp_Object
uniscribe_open (f, font_entity, pixel_size)
FRAME_PTR f;
Lisp_Object font_entity;
int pixel_size;
uniscribe_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size)
{
Lisp_Object font_object
= font_make_object (VECSIZE (struct uniscribe_font_info),
@ -148,9 +141,7 @@ uniscribe_open (f, font_entity, pixel_size)
}
static void
uniscribe_close (f, font)
FRAME_PTR f;
struct font *font;
uniscribe_close (FRAME_PTR f, struct font *font)
{
struct uniscribe_font_info *uniscribe_font
= (struct uniscribe_font_info *) font;
@ -164,8 +155,7 @@ uniscribe_close (f, font)
/* Return a list describing which scripts/languages FONT supports by
which GSUB/GPOS features of OpenType tables. */
static Lisp_Object
uniscribe_otf_capability (font)
struct font *font;
uniscribe_otf_capability (struct font *font)
{
HDC context;
HFONT old_font;
@ -202,8 +192,7 @@ uniscribe_otf_capability (font)
than the length of LGSTRING, nil should be return. In that case,
this function is called again with the larger LGSTRING. */
static Lisp_Object
uniscribe_shape (lgstring)
Lisp_Object lgstring;
uniscribe_shape (Lisp_Object lgstring)
{
struct font * font;
struct uniscribe_font_info * uniscribe_font;
@ -451,9 +440,7 @@ uniscribe_shape (lgstring)
Return a glyph code of FONT for characer C (Unicode code point).
If FONT doesn't have such a glyph, return FONT_INVALID_CODE. */
static unsigned
uniscribe_encode_char (font, c)
struct font *font;
int c;
uniscribe_encode_char (struct font *font, int c)
{
HDC context = NULL;
struct frame *f = NULL;
@ -574,12 +561,9 @@ uniscribe_encode_char (font, c)
Adds the name of opentype fonts to a Lisp list (passed in as the
lParam arg). */
static int CALLBACK
add_opentype_font_name_to_list (logical_font, physical_font, font_type,
list_object)
ENUMLOGFONTEX *logical_font;
NEWTEXTMETRICEX *physical_font;
DWORD font_type;
LPARAM list_object;
add_opentype_font_name_to_list (ENUMLOGFONTEX *logical_font,
NEWTEXTMETRICEX *physical_font,
DWORD font_type, LPARAM list_object)
{
Lisp_Object* list = (Lisp_Object *) list_object;
Lisp_Object family;
@ -650,9 +634,8 @@ static char* NOTHING = " ";
/* Check if font supports the otf script/language/features specified.
OTF_SPEC is in the format
(script lang [(gsub_feature ...)|nil] [(gpos_feature ...)]?) */
int uniscribe_check_otf (font, otf_spec)
LOGFONT *font;
Lisp_Object otf_spec;
int
uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec)
{
Lisp_Object script, lang, rest;
Lisp_Object features[2];
@ -947,7 +930,7 @@ struct font_driver uniscribe_font_driver =
NULL, /* get_outline */
NULL, /* free_outline */
NULL, /* anchor_point */
uniscribe_otf_capability, /* Defined so (font-get FONTOBJ :otf) works. */
uniscribe_otf_capability, /* Defined so (font-get FONTOBJ :otf) works. */
NULL, /* otf_drive - use shape instead. */
NULL, /* start_for_frame */
NULL, /* end_for_frame */
@ -957,7 +940,7 @@ struct font_driver uniscribe_font_driver =
/* Note that this should be called at every startup, not just when dumping,
as it needs to test for the existence of the Uniscribe library. */
void
syms_of_w32uniscribe ()
syms_of_w32uniscribe (void)
{
HMODULE uniscribe;

View file

@ -39,7 +39,7 @@ HANDLE input_available = NULL;
HANDLE interrupt_handle = NULL;
void
init_crit ()
init_crit (void)
{
InitializeCriticalSection (&critsect);
@ -57,7 +57,7 @@ init_crit ()
}
void
delete_crit ()
delete_crit (void)
{
DeleteCriticalSection (&critsect);
@ -74,7 +74,7 @@ delete_crit ()
}
void
signal_quit ()
signal_quit (void)
{
/* Make sure this event never remains signaled; if the main thread
isn't in a blocking call, then this should do nothing. */
@ -161,9 +161,7 @@ int_msg *lpTail = NULL;
int nQueue = 0;
BOOL
get_next_msg (lpmsg, bWait)
W32Msg * lpmsg;
BOOL bWait;
get_next_msg (W32Msg * lpmsg, BOOL bWait)
{
BOOL bRet = FALSE;
@ -245,8 +243,7 @@ get_next_msg (lpmsg, bWait)
}
BOOL
post_msg (lpmsg)
W32Msg * lpmsg;
post_msg (W32Msg * lpmsg)
{
int_msg * lpNew = (int_msg *) myalloc (sizeof (int_msg));
@ -298,7 +295,7 @@ prepend_msg (W32Msg *lpmsg)
/* Process all messages in the current thread's queue. */
void
drain_message_queue ()
drain_message_queue (void)
{
MSG msg;
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
@ -322,9 +319,7 @@ drain_message_queue ()
*/
static int
read_integer (string, NextString)
register char *string;
char **NextString;
read_integer (register char *string, char **NextString)
{
register int Result = 0;
int Sign = 1;
@ -348,10 +343,9 @@ read_integer (string, NextString)
}
int
XParseGeometry (string, x, y, width, height)
char *string;
int *x, *y;
unsigned int *width, *height; /* RETURN */
XParseGeometry (char *string,
int *x, int *y,
unsigned int *width, unsigned int *height)
{
int mask = NoValue;
register char *strind;
@ -446,8 +440,7 @@ XParseGeometry (string, x, y, width, height)
/* x_sync is a no-op on W32. */
void
x_sync (f)
void *f;
x_sync (void *f)
{
}