aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2010-07-07 18:28:47 +0300
committerEli Zaretskii2010-07-07 18:28:47 +0300
commit3a8ce8225692c705bb0dde88acb62bda6e688158 (patch)
treea3fbc455b85d68e97dec8aaf9985b2edc73a59ec /src
parentfd5539c6de4df242b517a73ced2fc1ff1f661227 (diff)
downloademacs-3a8ce8225692c705bb0dde88acb62bda6e688158.tar.gz
emacs-3a8ce8225692c705bb0dde88acb62bda6e688158.zip
Convert function definitions in MS-DOS sources to ANSI C.
msdos.h: msdos.c: dosfns.c: w16select.c: Convert function definitions to ANSI C. msdos.h (ctrl_break_func, install_ctrl_break_check): Remove unused prototypes.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/dosfns.c11
-rw-r--r--src/msdos.c160
-rw-r--r--src/msdos.h14
-rw-r--r--src/w16select.c33
5 files changed, 88 insertions, 140 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9f9e31b0b7b..63b0dd0a53d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12010-07-07 Eli Zaretskii <eliz@gnu.org>
2
3 * msdos.h:
4 * msdos.c:
5 * dosfns.c:
6 * w16select.c: Convert function definitions to ANSI C.
7
8 * msdos.h (ctrl_break_func, install_ctrl_break_check): Remove
9 unused prototypes.
10
12010-07-07 Juanma Barranquero <lekktu@gmail.com> 112010-07-07 Juanma Barranquero <lekktu@gmail.com>
2 12
3 * coding.c, sysdep.c: Convert some more functions to standard C. 13 * coding.c, sysdep.c: Convert some more functions to standard C.
diff --git a/src/dosfns.c b/src/dosfns.c
index e8756de21a1..e31f25203e9 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -283,7 +283,7 @@ restore_parent_vm_title (void)
283#endif /* !HAVE_X_WINDOWS */ 283#endif /* !HAVE_X_WINDOWS */
284 284
285void 285void
286init_dosfns () 286init_dosfns (void)
287{ 287{
288 union REGS regs; 288 union REGS regs;
289 _go32_dpmi_registers dpmiregs; 289 _go32_dpmi_registers dpmiregs;
@@ -481,9 +481,7 @@ w95_set_virtual_machine_title (const char *title_string)
481 sets the name in the frame struct, but has no other effects. */ 481 sets the name in the frame struct, but has no other effects. */
482 482
483void 483void
484x_set_title (f, name) 484x_set_title (struct frame *f, Lisp_Object name)
485 struct frame *f;
486 Lisp_Object name;
487{ 485{
488 /* Don't change the title if it's already NAME. */ 486 /* Don't change the title if it's already NAME. */
489 if (EQ (name, f->title)) 487 if (EQ (name, f->title))
@@ -536,7 +534,7 @@ If the underlying system call fails, value is nil. */)
536 (There are no other processes on DOS, right?) */ 534 (There are no other processes on DOS, right?) */
537 535
538Lisp_Object 536Lisp_Object
539list_system_processes () 537list_system_processes (void)
540{ 538{
541 Lisp_Object proclist = Qnil; 539 Lisp_Object proclist = Qnil;
542 540
@@ -689,7 +687,8 @@ dos_cleanup (void)
689/* 687/*
690 * Define everything 688 * Define everything
691 */ 689 */
692syms_of_dosfns () 690void
691syms_of_dosfns (void)
693{ 692{
694 defsubr (&Sint86); 693 defsubr (&Sint86);
695 defsubr (&Sdos_memget); 694 defsubr (&Sdos_memget);
diff --git a/src/msdos.c b/src/msdos.c
index 3e95978d58e..7e489bb6c47 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -102,7 +102,7 @@ int _crt0_startup_flags = (_CRT0_FLAG_UNIX_SBRK | _CRT0_FLAG_FILL_SBRK_MEMORY);
102#endif /* not SYSTEM_MALLOC */ 102#endif /* not SYSTEM_MALLOC */
103 103
104static unsigned long 104static unsigned long
105event_timestamp () 105event_timestamp (void)
106{ 106{
107 struct time t; 107 struct time t;
108 unsigned long s; 108 unsigned long s;
@@ -138,7 +138,7 @@ static int mouse_button_translate[NUM_MOUSE_BUTTONS];
138static int mouse_button_count; 138static int mouse_button_count;
139 139
140void 140void
141mouse_on () 141mouse_on (void)
142{ 142{
143 union REGS regs; 143 union REGS regs;
144 144
@@ -155,7 +155,7 @@ mouse_on ()
155} 155}
156 156
157void 157void
158mouse_off () 158mouse_off (void)
159{ 159{
160 union REGS regs; 160 union REGS regs;
161 161
@@ -222,8 +222,7 @@ mouse_get_xy (int *x, int *y)
222} 222}
223 223
224void 224void
225mouse_moveto (x, y) 225mouse_moveto (int x, int y)
226 int x, y;
227{ 226{
228 union REGS regs; 227 union REGS regs;
229 struct tty_display_info *tty = CURTTY (); 228 struct tty_display_info *tty = CURTTY ();
@@ -237,8 +236,7 @@ mouse_moveto (x, y)
237} 236}
238 237
239static int 238static int
240mouse_pressed (b, xp, yp) 239mouse_pressed (int b, int *xp, int *yp)
241 int b, *xp, *yp;
242{ 240{
243 union REGS regs; 241 union REGS regs;
244 242
@@ -253,8 +251,7 @@ mouse_pressed (b, xp, yp)
253} 251}
254 252
255static int 253static int
256mouse_released (b, xp, yp) 254mouse_released (int b, int *xp, int *yp)
257 int b, *xp, *yp;
258{ 255{
259 union REGS regs; 256 union REGS regs;
260 257
@@ -269,8 +266,7 @@ mouse_released (b, xp, yp)
269} 266}
270 267
271static int 268static int
272mouse_button_depressed (b, xp, yp) 269mouse_button_depressed (int b, int *xp, int *yp)
273 int b, *xp, *yp;
274{ 270{
275 union REGS regs; 271 union REGS regs;
276 272
@@ -288,12 +284,9 @@ mouse_button_depressed (b, xp, yp)
288} 284}
289 285
290void 286void
291mouse_get_pos (f, insist, bar_window, part, x, y, time) 287mouse_get_pos (FRAME_PTR *f, int insist, Lisp_Object *bar_window,
292 FRAME_PTR *f; 288 enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y,
293 int insist; 289 unsigned long *time)
294 Lisp_Object *bar_window, *x, *y;
295 enum scroll_bar_part *part;
296 unsigned long *time;
297{ 290{
298 int ix, iy; 291 int ix, iy;
299 Lisp_Object frame, tail; 292 Lisp_Object frame, tail;
@@ -311,7 +304,7 @@ mouse_get_pos (f, insist, bar_window, part, x, y, time)
311} 304}
312 305
313static void 306static void
314mouse_check_moved () 307mouse_check_moved (void)
315{ 308{
316 int x, y; 309 int x, y;
317 310
@@ -338,7 +331,7 @@ mouse_clear_clicks (void)
338} 331}
339 332
340void 333void
341mouse_init () 334mouse_init (void)
342{ 335{
343 union REGS regs; 336 union REGS regs;
344 struct tty_display_info *tty = CURTTY (); 337 struct tty_display_info *tty = CURTTY ();
@@ -440,10 +433,7 @@ dosv_refresh_virtual_screen (int offset, int count)
440} 433}
441 434
442static void 435static void
443dos_direct_output (y, x, buf, len) 436dos_direct_output (int y, int x, char *buf, int len)
444 int x, y;
445 char *buf;
446 int len;
447{ 437{
448 int t0 = 2 * (x + y * screen_size_X); 438 int t0 = 2 * (x + y * screen_size_X);
449 int t = t0 + (int) ScreenPrimary; 439 int t = t0 + (int) ScreenPrimary;
@@ -510,8 +500,7 @@ vga_installed (void)
510 ROWS x COLS frame. */ 500 ROWS x COLS frame. */
511 501
512void 502void
513dos_set_window_size (rows, cols) 503dos_set_window_size (int *rows, int *cols)
514 int *rows, *cols;
515{ 504{
516 char video_name[30]; 505 char video_name[30];
517 union REGS regs; 506 union REGS regs;
@@ -620,7 +609,7 @@ dos_set_window_size (rows, cols)
620 the mouse cursor may need to be refreshed. */ 609 the mouse cursor may need to be refreshed. */
621 610
622static void 611static void
623mouse_off_maybe () 612mouse_off_maybe (void)
624{ 613{
625 int x, y; 614 int x, y;
626 615
@@ -1864,10 +1853,7 @@ IT_copy_glyphs (int xfrom, int xto, size_t len, int ypos)
1864 1853
1865/* Insert and delete glyphs. */ 1854/* Insert and delete glyphs. */
1866static void 1855static void
1867IT_insert_glyphs (f, start, len) 1856IT_insert_glyphs (struct frame *f, struct glyph *start, int len)
1868 struct frame *f;
1869 register struct glyph *start;
1870 register int len;
1871{ 1857{
1872 int shift_by_width = screen_size_X - (new_pos_X + len); 1858 int shift_by_width = screen_size_X - (new_pos_X + len);
1873 1859
@@ -1880,18 +1866,14 @@ IT_insert_glyphs (f, start, len)
1880} 1866}
1881 1867
1882static void 1868static void
1883IT_delete_glyphs (f, n) 1869IT_delete_glyphs (struct frame *f, int n)
1884 struct frame *f;
1885 register int n;
1886{ 1870{
1887 abort (); 1871 abort ();
1888} 1872}
1889 1873
1890/* set-window-configuration on window.c needs this. */ 1874/* set-window-configuration on window.c needs this. */
1891void 1875void
1892x_set_menu_bar_lines (f, value, oldval) 1876x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1893 struct frame *f;
1894 Lisp_Object value, oldval;
1895{ 1877{
1896 set_menu_bar_lines (f, value, oldval); 1878 set_menu_bar_lines (f, value, oldval);
1897} 1879}
@@ -2080,9 +2062,7 @@ DEFUN ("msdos-remember-default-colors", Fmsdos_remember_default_colors,
2080} 2062}
2081 2063
2082void 2064void
2083IT_set_frame_parameters (f, alist) 2065IT_set_frame_parameters (struct frame *f, Lisp_Object alist)
2084 struct frame *f;
2085 Lisp_Object alist;
2086{ 2066{
2087 Lisp_Object tail; 2067 Lisp_Object tail;
2088 int i, j, length = XINT (Flength (alist)); 2068 int i, j, length = XINT (Flength (alist));
@@ -2289,7 +2269,7 @@ extern void init_frame_faces (FRAME_PTR);
2289/* Do we need the internal terminal? */ 2269/* Do we need the internal terminal? */
2290 2270
2291void 2271void
2292internal_terminal_init () 2272internal_terminal_init (void)
2293{ 2273{
2294 static int init_needed = 1; 2274 static int init_needed = 1;
2295 char *term = getenv ("TERM"), *colors; 2275 char *term = getenv ("TERM"), *colors;
@@ -2425,10 +2405,8 @@ initialize_msdos_display (struct terminal *term)
2425 term->read_socket_hook = &tty_read_avail_input; /* from keyboard.c */ 2405 term->read_socket_hook = &tty_read_avail_input; /* from keyboard.c */
2426} 2406}
2427 2407
2428dos_get_saved_screen (screen, rows, cols) 2408int
2429 char **screen; 2409dos_get_saved_screen (char **screen, int *rows, int *cols)
2430 int *rows;
2431 int *cols;
2432{ 2410{
2433#ifndef HAVE_X_WINDOWS 2411#ifndef HAVE_X_WINDOWS
2434 *screen = startup_screen_buffer; 2412 *screen = startup_screen_buffer;
@@ -2587,9 +2565,7 @@ static int keyboard_map_all;
2587static int international_keyboard; 2565static int international_keyboard;
2588 2566
2589int 2567int
2590dos_set_keyboard (code, always) 2568dos_set_keyboard (int code, int always)
2591 int code;
2592 int always;
2593{ 2569{
2594 int i; 2570 int i;
2595 _go32_dpmi_registers regs; 2571 _go32_dpmi_registers regs;
@@ -2856,8 +2832,7 @@ ibmpc_translate_map[] =
2856#define HYPER_P 0x8000 /* pseudo */ 2832#define HYPER_P 0x8000 /* pseudo */
2857 2833
2858static int 2834static int
2859dos_get_modifiers (keymask) 2835dos_get_modifiers (int *keymask)
2860 int *keymask;
2861{ 2836{
2862 union REGS regs; 2837 union REGS regs;
2863 int mask, modifiers = 0; 2838 int mask, modifiers = 0;
@@ -2939,7 +2914,7 @@ dos_get_modifiers (keymask)
2939#define NUM_RECENT_DOSKEYS (100) 2914#define NUM_RECENT_DOSKEYS (100)
2940int recent_doskeys_index; /* Index for storing next element into recent_doskeys */ 2915int recent_doskeys_index; /* Index for storing next element into recent_doskeys */
2941int total_doskeys; /* Total number of elements stored into recent_doskeys */ 2916int total_doskeys; /* Total number of elements stored into recent_doskeys */
2942Lisp_Object recent_doskeys; /* A vector, holding the last 100 keystrokes */ 2917Lisp_Object recent_doskeys; /* A vector, holding the last 100 keystrokes */
2943 2918
2944DEFUN ("recent-doskeys", Frecent_doskeys, Srecent_doskeys, 0, 0, 0, 2919DEFUN ("recent-doskeys", Frecent_doskeys, Srecent_doskeys, 0, 0, 0,
2945 doc: /* Return vector of last 100 keyboard input values seen in dos_rawgetc. 2920 doc: /* Return vector of last 100 keyboard input values seen in dos_rawgetc.
@@ -2966,7 +2941,7 @@ and then the scan code. */)
2966 2941
2967/* Get a char from keyboard. Function keys are put into the event queue. */ 2942/* Get a char from keyboard. Function keys are put into the event queue. */
2968static int 2943static int
2969dos_rawgetc () 2944dos_rawgetc (void)
2970{ 2945{
2971 struct input_event event; 2946 struct input_event event;
2972 union REGS regs; 2947 union REGS regs;
@@ -3317,8 +3292,8 @@ dos_rawgetc ()
3317static int prev_get_char = -1; 3292static int prev_get_char = -1;
3318 3293
3319/* Return 1 if a key is ready to be read without suspending execution. */ 3294/* Return 1 if a key is ready to be read without suspending execution. */
3320 3295int
3321dos_keysns () 3296dos_keysns (void)
3322{ 3297{
3323 if (prev_get_char != -1) 3298 if (prev_get_char != -1)
3324 return 1; 3299 return 1;
@@ -3327,8 +3302,8 @@ dos_keysns ()
3327} 3302}
3328 3303
3329/* Read a key. Return -1 if no key is ready. */ 3304/* Read a key. Return -1 if no key is ready. */
3330 3305int
3331dos_keyread () 3306dos_keyread (void)
3332{ 3307{
3333 if (prev_get_char != -1) 3308 if (prev_get_char != -1)
3334 { 3309 {
@@ -3357,7 +3332,7 @@ static char *menu_help_message, *prev_menu_help_message;
3357static int menu_help_paneno, menu_help_itemno; 3332static int menu_help_paneno, menu_help_itemno;
3358 3333
3359static XMenu * 3334static XMenu *
3360IT_menu_create () 3335IT_menu_create (void)
3361{ 3336{
3362 XMenu *menu; 3337 XMenu *menu;
3363 3338
@@ -3526,7 +3501,7 @@ IT_menu_display (XMenu *menu, int y, int x, int pn, int *faces, int disp_help)
3526/* Report availability of menus. */ 3501/* Report availability of menus. */
3527 3502
3528int 3503int
3529have_menus_p () { return 1; } 3504have_menus_p (void) { return 1; }
3530 3505
3531/* Create a brand new menu structure. */ 3506/* Create a brand new menu structure. */
3532 3507
@@ -3884,8 +3859,7 @@ void msdos_downcase_filename (unsigned char *);
3884/* Destructively turn backslashes into slashes. */ 3859/* Destructively turn backslashes into slashes. */
3885 3860
3886void 3861void
3887dostounix_filename (p) 3862dostounix_filename (char *p)
3888 register char *p;
3889{ 3863{
3890 msdos_downcase_filename (p); 3864 msdos_downcase_filename (p);
3891 3865
@@ -3900,8 +3874,7 @@ dostounix_filename (p)
3900/* Destructively turn slashes into backslashes. */ 3874/* Destructively turn slashes into backslashes. */
3901 3875
3902void 3876void
3903unixtodos_filename (p) 3877unixtodos_filename (char *p)
3904 register char *p;
3905{ 3878{
3906 if (p[1] == ':' && *p >= 'A' && *p <= 'Z') 3879 if (p[1] == ':' && *p >= 'A' && *p <= 'Z')
3907 { 3880 {
@@ -3920,9 +3893,7 @@ unixtodos_filename (p)
3920/* Get the default directory for a given drive. 0=def, 1=A, 2=B, ... */ 3893/* Get the default directory for a given drive. 0=def, 1=A, 2=B, ... */
3921 3894
3922int 3895int
3923getdefdir (drive, dst) 3896getdefdir (int drive, char *dst)
3924 int drive;
3925 char *dst;
3926{ 3897{
3927 char in_path[4], *p = in_path, e = errno; 3898 char in_path[4], *p = in_path, e = errno;
3928 3899
@@ -3961,9 +3932,7 @@ emacs_root_dir (void)
3961/* Remove all CR's that are followed by a LF. */ 3932/* Remove all CR's that are followed by a LF. */
3962 3933
3963int 3934int
3964crlf_to_lf (n, buf) 3935crlf_to_lf (int n, unsigned char *buf)
3965 register int n;
3966 register unsigned char *buf;
3967{ 3936{
3968 unsigned char *np = buf, *startp = buf, *endp = buf + n; 3937 unsigned char *np = buf, *startp = buf, *endp = buf + n;
3969 3938
@@ -3995,8 +3964,7 @@ DEFUN ("msdos-long-file-names", Fmsdos_long_file_names, Smsdos_long_file_names,
3995/* Convert alphabetic characters in a filename to lower-case. */ 3964/* Convert alphabetic characters in a filename to lower-case. */
3996 3965
3997void 3966void
3998msdos_downcase_filename (p) 3967msdos_downcase_filename (unsigned char *p)
3999 register unsigned char *p;
4000{ 3968{
4001 /* Always lower-case drive letters a-z, even if the filesystem 3969 /* Always lower-case drive letters a-z, even if the filesystem
4002 preserves case in filenames. 3970 preserves case in filenames.
@@ -4040,8 +4008,7 @@ The argument object is never altered--the value is a copy. */)
4040static char emacsroot[MAXPATHLEN]; 4008static char emacsroot[MAXPATHLEN];
4041 4009
4042char * 4010char *
4043rootrelativepath (rel) 4011rootrelativepath (char *rel)
4044 char *rel;
4045{ 4012{
4046 static char result[MAXPATHLEN + 10]; 4013 static char result[MAXPATHLEN + 10];
4047 4014
@@ -4056,10 +4023,7 @@ rootrelativepath (rel)
4056 break if one or more of these are missing. */ 4023 break if one or more of these are missing. */
4057 4024
4058void 4025void
4059init_environment (argc, argv, skip_args) 4026init_environment (int argc, char **argv, int skip_args)
4060 int argc;
4061 char **argv;
4062 int skip_args;
4063{ 4027{
4064 char *s, *t, *root; 4028 char *s, *t, *root;
4065 int len, i; 4029 int len, i;
@@ -4293,7 +4257,7 @@ dos_ttraw (struct tty_display_info *tty)
4293/* Restore status of standard input and Ctrl-C checking. */ 4257/* Restore status of standard input and Ctrl-C checking. */
4294 4258
4295int 4259int
4296dos_ttcooked () 4260dos_ttcooked (void)
4297{ 4261{
4298 union REGS inregs, outregs; 4262 union REGS inregs, outregs;
4299 4263
@@ -4319,11 +4283,8 @@ dos_ttcooked ()
4319 file TEMPOUT and stderr to TEMPERR. */ 4283 file TEMPOUT and stderr to TEMPERR. */
4320 4284
4321int 4285int
4322run_msdos_command (argv, working_dir, tempin, tempout, temperr, envv) 4286run_msdos_command (unsigned char **argv, const char *working_dir,
4323 unsigned char **argv; 4287 int tempin, int tempout, int temperr, char **envv)
4324 const char *working_dir;
4325 int tempin, tempout, temperr;
4326 char **envv;
4327{ 4288{
4328 char *saveargv1, *saveargv2, *lowcase_argv0, *pa, *pl; 4289 char *saveargv1, *saveargv2, *lowcase_argv0, *pa, *pl;
4329 char oldwd[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */ 4290 char oldwd[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */
@@ -4464,8 +4425,7 @@ run_msdos_command (argv, working_dir, tempin, tempout, temperr, envv)
4464} 4425}
4465 4426
4466void 4427void
4467croak (badfunc) 4428croak (char *badfunc)
4468 char *badfunc;
4469{ 4429{
4470 fprintf (stderr, "%s not yet implemented\r\n", badfunc); 4430 fprintf (stderr, "%s not yet implemented\r\n", badfunc);
4471 reset_all_sys_modes (); 4431 reset_all_sys_modes ();
@@ -4475,8 +4435,8 @@ croak (badfunc)
4475/* 4435/*
4476 * A few unimplemented functions that we silently ignore. 4436 * A few unimplemented functions that we silently ignore.
4477 */ 4437 */
4478setpgrp () {return 0; } 4438int setpgrp (void) {return 0; }
4479setpriority (x,y,z) int x,y,z; { return 0; } 4439int setpriority (int x, int y, int z) { return 0; }
4480 4440
4481#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2 4441#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
4482 4442
@@ -4501,17 +4461,13 @@ static sighandler_t prev_handlers[320];
4501/* A signal handler which just records that a signal occurred 4461/* A signal handler which just records that a signal occurred
4502 (it will be raised later, if and when the signal is unblocked). */ 4462 (it will be raised later, if and when the signal is unblocked). */
4503static void 4463static void
4504sig_suspender (signo) 4464sig_suspender (int signo)
4505 int signo;
4506{ 4465{
4507 sigaddset (&msdos_pending_signals, signo); 4466 sigaddset (&msdos_pending_signals, signo);
4508} 4467}
4509 4468
4510int 4469int
4511sigprocmask (how, new_set, old_set) 4470sigprocmask (int how, const sigset_t *new_set, sigset_t *old_set)
4512 int how;
4513 const sigset_t *new_set;
4514 sigset_t *old_set;
4515{ 4471{
4516 int signo; 4472 int signo;
4517 sigset_t new_mask; 4473 sigset_t new_mask;
@@ -4613,10 +4569,8 @@ dos_yield_time_slice (void)
4613/* We don't have to call timer_check here 4569/* We don't have to call timer_check here
4614 because wait_reading_process_output takes care of that. */ 4570 because wait_reading_process_output takes care of that. */
4615int 4571int
4616sys_select (nfds, rfds, wfds, efds, timeout) 4572sys_select (int nfds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
4617 int nfds; 4573 EMACS_TIME *timeout)
4618 SELECT_TYPE *rfds, *wfds, *efds;
4619 EMACS_TIME *timeout;
4620{ 4574{
4621 int check_input; 4575 int check_input;
4622 struct time t; 4576 struct time t;
@@ -4686,11 +4640,10 @@ sys_select (nfds, rfds, wfds, efds, timeout)
4686 4640
4687#ifdef chdir 4641#ifdef chdir
4688#undef chdir 4642#undef chdir
4689extern int chdir (); 4643extern int chdir (const char *);
4690 4644
4691int 4645int
4692sys_chdir (path) 4646sys_chdir (const char *path)
4693 const char* path;
4694{ 4647{
4695 int len = strlen (path); 4648 int len = strlen (path);
4696 char *tmp = (char *)path; 4649 char *tmp = (char *)path;
@@ -4719,7 +4672,7 @@ sys_chdir (path)
4719extern void tzset (void); 4672extern void tzset (void);
4720 4673
4721void 4674void
4722init_gettimeofday () 4675init_gettimeofday (void)
4723{ 4676{
4724 time_t ltm, gtm; 4677 time_t ltm, gtm;
4725 struct tm *lstm; 4678 struct tm *lstm;
@@ -4737,9 +4690,7 @@ init_gettimeofday ()
4737#ifdef abort 4690#ifdef abort
4738#undef abort 4691#undef abort
4739void 4692void
4740dos_abort (file, line) 4693dos_abort (char *file, int line)
4741 char *file;
4742 int line;
4743{ 4694{
4744 char buffer1[200], buffer2[400]; 4695 char buffer1[200], buffer2[400];
4745 int i, j; 4696 int i, j;
@@ -4755,7 +4706,7 @@ dos_abort (file, line)
4755} 4706}
4756#else 4707#else
4757void 4708void
4758abort () 4709abort (void)
4759{ 4710{
4760 dos_ttcooked (); 4711 dos_ttcooked ();
4761 ScreenSetCursor (10, 0); 4712 ScreenSetCursor (10, 0);
@@ -4780,7 +4731,8 @@ abort ()
4780static int delete_exited_processes; 4731static int delete_exited_processes;
4781#endif 4732#endif
4782 4733
4783syms_of_msdos () 4734void
4735syms_of_msdos (void)
4784{ 4736{
4785 recent_doskeys = Fmake_vector (make_number (NUM_RECENT_DOSKEYS), Qnil); 4737 recent_doskeys = Fmake_vector (make_number (NUM_RECENT_DOSKEYS), Qnil);
4786 staticpro (&recent_doskeys); 4738 staticpro (&recent_doskeys);
diff --git a/src/msdos.h b/src/msdos.h
index 5f8b5e72532..fe9964af25e 100644
--- a/src/msdos.h
+++ b/src/msdos.h
@@ -23,7 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23#include <dpmi.h> 23#include <dpmi.h>
24 24
25int dos_ttraw (struct tty_display_info *); 25int dos_ttraw (struct tty_display_info *);
26int dos_ttcooked (); 26int dos_ttcooked (void);
27int dos_get_saved_screen (char **, int *, int *); 27int dos_get_saved_screen (char **, int *, int *);
28int dos_set_keyboard (int, int); 28int dos_set_keyboard (int, int);
29void dos_set_window_size (int *, int *); 29void dos_set_window_size (int *, int *);
@@ -32,15 +32,13 @@ int getdefdir (int, char*);
32void unixtodos_filename (char *); 32void unixtodos_filename (char *);
33void dostounix_filename (char *); 33void dostounix_filename (char *);
34char *rootrelativepath (char *); 34char *rootrelativepath (char *);
35void init_environment (); 35void init_environment (int, char **, int);
36void internal_terminal_init (); 36void internal_terminal_init (void);
37void ctrl_break_func (_go32_dpmi_registers *);
38void install_ctrl_break_check ();
39 37
40extern int have_mouse; 38extern int have_mouse;
41void mouse_init (); 39void mouse_init (void);
42void mouse_on (); 40void mouse_on (void);
43void mouse_off (); 41void mouse_off (void);
44void mouse_moveto (int, int); 42void mouse_moveto (int, int);
45 43
46#ifndef HAVE_X_WINDOWS 44#ifndef HAVE_X_WINDOWS
diff --git a/src/w16select.c b/src/w16select.c
index 9ebf6de6250..38c773cd87f 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -109,7 +109,7 @@ static size_t clipboard_storage_size;
109 109
110/* Return the WinOldAp support version, or 0x1700 if not supported. */ 110/* Return the WinOldAp support version, or 0x1700 if not supported. */
111unsigned 111unsigned
112identify_winoldap_version () 112identify_winoldap_version (void)
113{ 113{
114 __dpmi_regs regs; 114 __dpmi_regs regs;
115 115
@@ -124,7 +124,7 @@ identify_winoldap_version ()
124 124
125/* Open the clipboard, return non-zero if successfull. */ 125/* Open the clipboard, return non-zero if successfull. */
126unsigned 126unsigned
127open_clipboard () 127open_clipboard (void)
128{ 128{
129 __dpmi_regs regs; 129 __dpmi_regs regs;
130 130
@@ -147,7 +147,7 @@ open_clipboard ()
147 147
148/* Empty clipboard, return non-zero if successfull. */ 148/* Empty clipboard, return non-zero if successfull. */
149unsigned 149unsigned
150empty_clipboard () 150empty_clipboard (void)
151{ 151{
152 __dpmi_regs regs; 152 __dpmi_regs regs;
153 153
@@ -162,8 +162,7 @@ empty_clipboard ()
162/* Ensure we have a buffer in low memory with enough memory for data 162/* Ensure we have a buffer in low memory with enough memory for data
163 of size WANT_SIZE. Return the linear address of the buffer. */ 163 of size WANT_SIZE. Return the linear address of the buffer. */
164static unsigned long 164static unsigned long
165alloc_xfer_buf (want_size) 165alloc_xfer_buf (unsigned want_size)
166 unsigned want_size;
167{ 166{
168 __dpmi_regs regs; 167 __dpmi_regs regs;
169 168
@@ -200,7 +199,7 @@ alloc_xfer_buf (want_size)
200 The clipboard buffer tends to be large in size, because for small 199 The clipboard buffer tends to be large in size, because for small
201 clipboard data sizes we use the DJGPP transfer buffer. */ 200 clipboard data sizes we use the DJGPP transfer buffer. */
202static void 201static void
203free_xfer_buf () 202free_xfer_buf (void)
204{ 203{
205 /* If the size is 0, we used DJGPP transfer buffer, so don't free. */ 204 /* If the size is 0, we used DJGPP transfer buffer, so don't free. */
206 if (clipboard_xfer_buf_info.size) 205 if (clipboard_xfer_buf_info.size)
@@ -218,11 +217,7 @@ free_xfer_buf ()
218 217
219/* Copy data into the clipboard, return zero if successfull. */ 218/* Copy data into the clipboard, return zero if successfull. */
220unsigned 219unsigned
221set_clipboard_data (Format, Data, Size, Raw) 220set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
222 unsigned Format;
223 void *Data;
224 unsigned Size;
225 int Raw;
226{ 221{
227 __dpmi_regs regs; 222 __dpmi_regs regs;
228 unsigned truelen; 223 unsigned truelen;
@@ -321,8 +316,7 @@ set_clipboard_data (Format, Data, Size, Raw)
321 316
322/* Return the size of the clipboard data of format FORMAT. */ 317/* Return the size of the clipboard data of format FORMAT. */
323unsigned 318unsigned
324get_clipboard_data_size (Format) 319get_clipboard_data_size (unsigned Format)
325 unsigned Format;
326{ 320{
327 __dpmi_regs regs; 321 __dpmi_regs regs;
328 322
@@ -342,11 +336,7 @@ get_clipboard_data_size (Format)
342 Warning: this doesn't check whether DATA has enough space to hold 336 Warning: this doesn't check whether DATA has enough space to hold
343 SIZE bytes. */ 337 SIZE bytes. */
344unsigned 338unsigned
345get_clipboard_data (Format, Data, Size, Raw) 339get_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
346 unsigned Format;
347 void *Data;
348 unsigned Size;
349 int Raw;
350{ 340{
351 __dpmi_regs regs; 341 __dpmi_regs regs;
352 unsigned long xbuf_addr; 342 unsigned long xbuf_addr;
@@ -425,7 +415,7 @@ get_clipboard_data (Format, Data, Size, Raw)
425 415
426/* Close clipboard, return non-zero if successfull. */ 416/* Close clipboard, return non-zero if successfull. */
427unsigned 417unsigned
428close_clipboard () 418close_clipboard (void)
429{ 419{
430 __dpmi_regs regs; 420 __dpmi_regs regs;
431 421
@@ -439,8 +429,7 @@ close_clipboard ()
439 429
440/* Compact clipboard data so that at least SIZE bytes is available. */ 430/* Compact clipboard data so that at least SIZE bytes is available. */
441unsigned 431unsigned
442clipboard_compact (Size) 432clipboard_compact (unsigned Size)
443 unsigned Size;
444{ 433{
445 __dpmi_regs regs; 434 __dpmi_regs regs;
446 435
@@ -705,7 +694,7 @@ and t is the same as `SECONDARY'. */)
705} 694}
706 695
707void 696void
708syms_of_win16select () 697syms_of_win16select (void)
709{ 698{
710 defsubr (&Sw16_set_clipboard_data); 699 defsubr (&Sw16_set_clipboard_data);
711 defsubr (&Sw16_get_clipboard_data); 700 defsubr (&Sw16_get_clipboard_data);