diff options
| author | Eli Zaretskii | 2010-07-07 18:28:47 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2010-07-07 18:28:47 +0300 |
| commit | 3a8ce8225692c705bb0dde88acb62bda6e688158 (patch) | |
| tree | a3fbc455b85d68e97dec8aaf9985b2edc73a59ec /src | |
| parent | fd5539c6de4df242b517a73ced2fc1ff1f661227 (diff) | |
| download | emacs-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/ChangeLog | 10 | ||||
| -rw-r--r-- | src/dosfns.c | 11 | ||||
| -rw-r--r-- | src/msdos.c | 160 | ||||
| -rw-r--r-- | src/msdos.h | 14 | ||||
| -rw-r--r-- | src/w16select.c | 33 |
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 @@ | |||
| 1 | 2010-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 | |||
| 1 | 2010-07-07 Juanma Barranquero <lekktu@gmail.com> | 11 | 2010-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 | ||
| 285 | void | 285 | void |
| 286 | init_dosfns () | 286 | init_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 | ||
| 483 | void | 483 | void |
| 484 | x_set_title (f, name) | 484 | x_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 | ||
| 538 | Lisp_Object | 536 | Lisp_Object |
| 539 | list_system_processes () | 537 | list_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 | */ |
| 692 | syms_of_dosfns () | 690 | void |
| 691 | syms_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 | ||
| 104 | static unsigned long | 104 | static unsigned long |
| 105 | event_timestamp () | 105 | event_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]; | |||
| 138 | static int mouse_button_count; | 138 | static int mouse_button_count; |
| 139 | 139 | ||
| 140 | void | 140 | void |
| 141 | mouse_on () | 141 | mouse_on (void) |
| 142 | { | 142 | { |
| 143 | union REGS regs; | 143 | union REGS regs; |
| 144 | 144 | ||
| @@ -155,7 +155,7 @@ mouse_on () | |||
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | void | 157 | void |
| 158 | mouse_off () | 158 | mouse_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 | ||
| 224 | void | 224 | void |
| 225 | mouse_moveto (x, y) | 225 | mouse_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 | ||
| 239 | static int | 238 | static int |
| 240 | mouse_pressed (b, xp, yp) | 239 | mouse_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 | ||
| 255 | static int | 253 | static int |
| 256 | mouse_released (b, xp, yp) | 254 | mouse_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 | ||
| 271 | static int | 268 | static int |
| 272 | mouse_button_depressed (b, xp, yp) | 269 | mouse_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 | ||
| 290 | void | 286 | void |
| 291 | mouse_get_pos (f, insist, bar_window, part, x, y, time) | 287 | mouse_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 | ||
| 313 | static void | 306 | static void |
| 314 | mouse_check_moved () | 307 | mouse_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 | ||
| 340 | void | 333 | void |
| 341 | mouse_init () | 334 | mouse_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 | ||
| 442 | static void | 435 | static void |
| 443 | dos_direct_output (y, x, buf, len) | 436 | dos_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 | ||
| 512 | void | 502 | void |
| 513 | dos_set_window_size (rows, cols) | 503 | dos_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 | ||
| 622 | static void | 611 | static void |
| 623 | mouse_off_maybe () | 612 | mouse_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. */ |
| 1866 | static void | 1855 | static void |
| 1867 | IT_insert_glyphs (f, start, len) | 1856 | IT_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 | ||
| 1882 | static void | 1868 | static void |
| 1883 | IT_delete_glyphs (f, n) | 1869 | IT_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. */ |
| 1891 | void | 1875 | void |
| 1892 | x_set_menu_bar_lines (f, value, oldval) | 1876 | x_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 | ||
| 2082 | void | 2064 | void |
| 2083 | IT_set_frame_parameters (f, alist) | 2065 | IT_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 | ||
| 2291 | void | 2271 | void |
| 2292 | internal_terminal_init () | 2272 | internal_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 | ||
| 2428 | dos_get_saved_screen (screen, rows, cols) | 2408 | int |
| 2429 | char **screen; | 2409 | dos_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; | |||
| 2587 | static int international_keyboard; | 2565 | static int international_keyboard; |
| 2588 | 2566 | ||
| 2589 | int | 2567 | int |
| 2590 | dos_set_keyboard (code, always) | 2568 | dos_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 | ||
| 2858 | static int | 2834 | static int |
| 2859 | dos_get_modifiers (keymask) | 2835 | dos_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) |
| 2940 | int recent_doskeys_index; /* Index for storing next element into recent_doskeys */ | 2915 | int recent_doskeys_index; /* Index for storing next element into recent_doskeys */ |
| 2941 | int total_doskeys; /* Total number of elements stored into recent_doskeys */ | 2916 | int total_doskeys; /* Total number of elements stored into recent_doskeys */ |
| 2942 | Lisp_Object recent_doskeys; /* A vector, holding the last 100 keystrokes */ | 2917 | Lisp_Object recent_doskeys; /* A vector, holding the last 100 keystrokes */ |
| 2943 | 2918 | ||
| 2944 | DEFUN ("recent-doskeys", Frecent_doskeys, Srecent_doskeys, 0, 0, 0, | 2919 | DEFUN ("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. */ |
| 2968 | static int | 2943 | static int |
| 2969 | dos_rawgetc () | 2944 | dos_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 () | |||
| 3317 | static int prev_get_char = -1; | 3292 | static 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 | 3295 | int | |
| 3321 | dos_keysns () | 3296 | dos_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 | 3305 | int | |
| 3331 | dos_keyread () | 3306 | dos_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; | |||
| 3357 | static int menu_help_paneno, menu_help_itemno; | 3332 | static int menu_help_paneno, menu_help_itemno; |
| 3358 | 3333 | ||
| 3359 | static XMenu * | 3334 | static XMenu * |
| 3360 | IT_menu_create () | 3335 | IT_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 | ||
| 3528 | int | 3503 | int |
| 3529 | have_menus_p () { return 1; } | 3504 | have_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 | ||
| 3886 | void | 3861 | void |
| 3887 | dostounix_filename (p) | 3862 | dostounix_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 | ||
| 3902 | void | 3876 | void |
| 3903 | unixtodos_filename (p) | 3877 | unixtodos_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 | ||
| 3922 | int | 3895 | int |
| 3923 | getdefdir (drive, dst) | 3896 | getdefdir (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 | ||
| 3963 | int | 3934 | int |
| 3964 | crlf_to_lf (n, buf) | 3935 | crlf_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 | ||
| 3997 | void | 3966 | void |
| 3998 | msdos_downcase_filename (p) | 3967 | msdos_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. */) | |||
| 4040 | static char emacsroot[MAXPATHLEN]; | 4008 | static char emacsroot[MAXPATHLEN]; |
| 4041 | 4009 | ||
| 4042 | char * | 4010 | char * |
| 4043 | rootrelativepath (rel) | 4011 | rootrelativepath (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 | ||
| 4058 | void | 4025 | void |
| 4059 | init_environment (argc, argv, skip_args) | 4026 | init_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 | ||
| 4295 | int | 4259 | int |
| 4296 | dos_ttcooked () | 4260 | dos_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 | ||
| 4321 | int | 4285 | int |
| 4322 | run_msdos_command (argv, working_dir, tempin, tempout, temperr, envv) | 4286 | run_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 | ||
| 4466 | void | 4427 | void |
| 4467 | croak (badfunc) | 4428 | croak (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 | */ |
| 4478 | setpgrp () {return 0; } | 4438 | int setpgrp (void) {return 0; } |
| 4479 | setpriority (x,y,z) int x,y,z; { return 0; } | 4439 | int 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). */ |
| 4503 | static void | 4463 | static void |
| 4504 | sig_suspender (signo) | 4464 | sig_suspender (int signo) |
| 4505 | int signo; | ||
| 4506 | { | 4465 | { |
| 4507 | sigaddset (&msdos_pending_signals, signo); | 4466 | sigaddset (&msdos_pending_signals, signo); |
| 4508 | } | 4467 | } |
| 4509 | 4468 | ||
| 4510 | int | 4469 | int |
| 4511 | sigprocmask (how, new_set, old_set) | 4470 | sigprocmask (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. */ |
| 4615 | int | 4571 | int |
| 4616 | sys_select (nfds, rfds, wfds, efds, timeout) | 4572 | sys_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 |
| 4689 | extern int chdir (); | 4643 | extern int chdir (const char *); |
| 4690 | 4644 | ||
| 4691 | int | 4645 | int |
| 4692 | sys_chdir (path) | 4646 | sys_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) | |||
| 4719 | extern void tzset (void); | 4672 | extern void tzset (void); |
| 4720 | 4673 | ||
| 4721 | void | 4674 | void |
| 4722 | init_gettimeofday () | 4675 | init_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 |
| 4739 | void | 4692 | void |
| 4740 | dos_abort (file, line) | 4693 | dos_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 |
| 4757 | void | 4708 | void |
| 4758 | abort () | 4709 | abort (void) |
| 4759 | { | 4710 | { |
| 4760 | dos_ttcooked (); | 4711 | dos_ttcooked (); |
| 4761 | ScreenSetCursor (10, 0); | 4712 | ScreenSetCursor (10, 0); |
| @@ -4780,7 +4731,8 @@ abort () | |||
| 4780 | static int delete_exited_processes; | 4731 | static int delete_exited_processes; |
| 4781 | #endif | 4732 | #endif |
| 4782 | 4733 | ||
| 4783 | syms_of_msdos () | 4734 | void |
| 4735 | syms_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 | ||
| 25 | int dos_ttraw (struct tty_display_info *); | 25 | int dos_ttraw (struct tty_display_info *); |
| 26 | int dos_ttcooked (); | 26 | int dos_ttcooked (void); |
| 27 | int dos_get_saved_screen (char **, int *, int *); | 27 | int dos_get_saved_screen (char **, int *, int *); |
| 28 | int dos_set_keyboard (int, int); | 28 | int dos_set_keyboard (int, int); |
| 29 | void dos_set_window_size (int *, int *); | 29 | void dos_set_window_size (int *, int *); |
| @@ -32,15 +32,13 @@ int getdefdir (int, char*); | |||
| 32 | void unixtodos_filename (char *); | 32 | void unixtodos_filename (char *); |
| 33 | void dostounix_filename (char *); | 33 | void dostounix_filename (char *); |
| 34 | char *rootrelativepath (char *); | 34 | char *rootrelativepath (char *); |
| 35 | void init_environment (); | 35 | void init_environment (int, char **, int); |
| 36 | void internal_terminal_init (); | 36 | void internal_terminal_init (void); |
| 37 | void ctrl_break_func (_go32_dpmi_registers *); | ||
| 38 | void install_ctrl_break_check (); | ||
| 39 | 37 | ||
| 40 | extern int have_mouse; | 38 | extern int have_mouse; |
| 41 | void mouse_init (); | 39 | void mouse_init (void); |
| 42 | void mouse_on (); | 40 | void mouse_on (void); |
| 43 | void mouse_off (); | 41 | void mouse_off (void); |
| 44 | void mouse_moveto (int, int); | 42 | void 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. */ |
| 111 | unsigned | 111 | unsigned |
| 112 | identify_winoldap_version () | 112 | identify_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. */ |
| 126 | unsigned | 126 | unsigned |
| 127 | open_clipboard () | 127 | open_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. */ |
| 149 | unsigned | 149 | unsigned |
| 150 | empty_clipboard () | 150 | empty_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. */ |
| 164 | static unsigned long | 164 | static unsigned long |
| 165 | alloc_xfer_buf (want_size) | 165 | alloc_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. */ |
| 202 | static void | 201 | static void |
| 203 | free_xfer_buf () | 202 | free_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. */ |
| 220 | unsigned | 219 | unsigned |
| 221 | set_clipboard_data (Format, Data, Size, Raw) | 220 | set_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. */ |
| 323 | unsigned | 318 | unsigned |
| 324 | get_clipboard_data_size (Format) | 319 | get_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. */ |
| 344 | unsigned | 338 | unsigned |
| 345 | get_clipboard_data (Format, Data, Size, Raw) | 339 | get_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. */ |
| 427 | unsigned | 417 | unsigned |
| 428 | close_clipboard () | 418 | close_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. */ |
| 441 | unsigned | 431 | unsigned |
| 442 | clipboard_compact (Size) | 432 | clipboard_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 | ||
| 707 | void | 696 | void |
| 708 | syms_of_win16select () | 697 | syms_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); |