diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 39 | ||||
| -rw-r--r-- | src/dosfns.c | 6 | ||||
| -rw-r--r-- | src/dosfns.h | 1 | ||||
| -rw-r--r-- | src/msdos.c | 97 | ||||
| -rw-r--r-- | src/unexcoff.c | 41 | ||||
| -rw-r--r-- | src/w16select.c | 8 | ||||
| -rw-r--r-- | src/xmenu.c | 2 |
7 files changed, 93 insertions, 101 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9c004656124..024cf18efb6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,44 @@ | |||
| 1 | 2010-08-13 Eli Zaretskii <eliz@gnu.org> | 1 | 2010-08-13 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * unexcoff.c: Remove the parts used when "emacs" is not defined. | ||
| 4 | (report_error, report_error_1): Ditto. | ||
| 5 | (write_segment): Remove "#if 0" unused code. | ||
| 6 | (make_hdr): Remove code that was "#ifndef NO_REMAP" before | ||
| 7 | NO_REMAP was removed (in 2010-07-29T03:25:08Z!dann@ics.uci.edu). | ||
| 8 | (start_of_text): Remove unused function (was used only if NO_REMAP | ||
| 9 | was NOT defined). | ||
| 10 | |||
| 11 | * msdos.c (IT_set_face): Fix format string to match argument | ||
| 12 | types. | ||
| 13 | (IT_write_glyphs, IT_note_mode_line_highlight) | ||
| 14 | (IT_set_frame_parameters): Remove unused variables. | ||
| 15 | (x_set_menu_bar_lines): Declare set_menu_bar_lines. | ||
| 16 | (IT_set_terminal_modes): Disambiguate expression in if clause. | ||
| 17 | (Fmsdos_remember_default_colors): Return Qnil. | ||
| 18 | (IT_set_frame_parameters): Add parens to disambiguate boolean | ||
| 19 | expression for logging the cursor type to termscript. | ||
| 20 | (keyboard_layout_list, keypad_translate_map) | ||
| 21 | (grey_key_translate_map): Add braces in inner initializers. | ||
| 22 | (dos_rawgetc): Add parens in condition for mouse-3 button-press. | ||
| 23 | (dos_rawgetc): Remove unused label. | ||
| 24 | (XMenuActivate): Add braces to remove ambiguous `else'. | ||
| 25 | (dos_ttraw): Always return a value. | ||
| 26 | (spawnve): Declare. | ||
| 27 | (run_msdos_command): Cast 3rd arg of spawnve to "char **". | ||
| 28 | |||
| 29 | * dosfns.h (x_set_title): Declare. | ||
| 30 | |||
| 31 | * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data): | ||
| 32 | Remove unused variables. | ||
| 33 | |||
| 34 | * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Remove unused | ||
| 35 | variables. | ||
| 36 | (init_dosfns): Declare get_lim_data. | ||
| 37 | (system_process_attributes): Declare Fget_internal_run_time. | ||
| 38 | |||
| 39 | * xmenu.c (xmenu_show) [!USE_X_TOOLKIT && !USE_GTK]: Fix argument | ||
| 40 | list to be consistent with menu.h. | ||
| 41 | |||
| 3 | * w32menu.c (add_menu_item, name_is_separator): Shut up compiler | 42 | * w32menu.c (add_menu_item, name_is_separator): Shut up compiler |
| 4 | warnings due to mixing of "char *" and "const char *". | 43 | warnings due to mixing of "char *" and "const char *". |
| 5 | 44 | ||
diff --git a/src/dosfns.c b/src/dosfns.c index 5be0a363da8..e66b50ed3ff 100644 --- a/src/dosfns.c +++ b/src/dosfns.c | |||
| @@ -60,7 +60,6 @@ REGISTERS should be a vector produced by `make-register' and | |||
| 60 | register int i; | 60 | register int i; |
| 61 | int no; | 61 | int no; |
| 62 | union REGS inregs, outregs; | 62 | union REGS inregs, outregs; |
| 63 | Lisp_Object val; | ||
| 64 | 63 | ||
| 65 | CHECK_NUMBER (interrupt); | 64 | CHECK_NUMBER (interrupt); |
| 66 | no = (unsigned long) XINT (interrupt); | 65 | no = (unsigned long) XINT (interrupt); |
| @@ -101,7 +100,6 @@ Return the updated VECTOR. */) | |||
| 101 | register int i; | 100 | register int i; |
| 102 | int offs, len; | 101 | int offs, len; |
| 103 | char *buf; | 102 | char *buf; |
| 104 | Lisp_Object val; | ||
| 105 | 103 | ||
| 106 | CHECK_NUMBER (address); | 104 | CHECK_NUMBER (address); |
| 107 | offs = (unsigned long) XINT (address); | 105 | offs = (unsigned long) XINT (address); |
| @@ -125,7 +123,6 @@ DEFUN ("msdos-memput", Fdos_memput, Sdos_memput, 2, 2, 0, | |||
| 125 | register int i; | 123 | register int i; |
| 126 | int offs, len; | 124 | int offs, len; |
| 127 | char *buf; | 125 | char *buf; |
| 128 | Lisp_Object val; | ||
| 129 | 126 | ||
| 130 | CHECK_NUMBER (address); | 127 | CHECK_NUMBER (address); |
| 131 | offs = (unsigned long) XINT (address); | 128 | offs = (unsigned long) XINT (address); |
| @@ -286,6 +283,8 @@ init_dosfns (void) | |||
| 286 | unsigned long xbuf = _go32_info_block.linear_address_of_transfer_buffer; | 283 | unsigned long xbuf = _go32_info_block.linear_address_of_transfer_buffer; |
| 287 | 284 | ||
| 288 | #ifndef SYSTEM_MALLOC | 285 | #ifndef SYSTEM_MALLOC |
| 286 | extern void get_lim_data (void); | ||
| 287 | |||
| 289 | get_lim_data (); /* why the hell isn't this called elsewhere? */ | 288 | get_lim_data (); /* why the hell isn't this called elsewhere? */ |
| 290 | #endif | 289 | #endif |
| 291 | 290 | ||
| @@ -558,6 +557,7 @@ system_process_attributes (Lisp_Object pid) | |||
| 558 | int i; | 557 | int i; |
| 559 | Lisp_Object cmd_str, decoded_cmd, tem; | 558 | Lisp_Object cmd_str, decoded_cmd, tem; |
| 560 | double pmem; | 559 | double pmem; |
| 560 | EXFUN (Fget_internal_run_time, 0); | ||
| 561 | #ifndef SYSTEM_MALLOC | 561 | #ifndef SYSTEM_MALLOC |
| 562 | extern unsigned long ret_lim_data (); | 562 | extern unsigned long ret_lim_data (); |
| 563 | #endif | 563 | #endif |
diff --git a/src/dosfns.h b/src/dosfns.h index 820b6b30e43..d31401247b4 100644 --- a/src/dosfns.h +++ b/src/dosfns.h | |||
| @@ -40,6 +40,7 @@ extern Lisp_Object Vdos_display_scancodes; | |||
| 40 | 40 | ||
| 41 | extern int msdos_stdcolor_idx (const char *); | 41 | extern int msdos_stdcolor_idx (const char *); |
| 42 | extern Lisp_Object msdos_stdcolor_name (int); | 42 | extern Lisp_Object msdos_stdcolor_name (int); |
| 43 | extern void x_set_title (struct frame *, Lisp_Object); | ||
| 43 | #endif | 44 | #endif |
| 44 | 45 | ||
| 45 | /* arch-tag: a83b8c4c-63c8-451e-9e94-bc72e3e2f8bc | 46 | /* arch-tag: a83b8c4c-63c8-451e-9e94-bc72e3e2f8bc |
diff --git a/src/msdos.c b/src/msdos.c index ad529d00dea..086cad2ff84 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -68,8 +68,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 68 | #include <pc.h> | 68 | #include <pc.h> |
| 69 | #include <ctype.h> | 69 | #include <ctype.h> |
| 70 | /* #include <process.h> */ | 70 | /* #include <process.h> */ |
| 71 | /* Damn that local process.h! Instead we can define P_WAIT ourselves. */ | 71 | /* Damn that local process.h! Instead we can define P_WAIT and |
| 72 | spawnve ourselves. */ | ||
| 72 | #define P_WAIT 1 | 73 | #define P_WAIT 1 |
| 74 | extern int spawnve (int, const char *, char *const [], char *const []); | ||
| 73 | 75 | ||
| 74 | #ifndef _USE_LFN | 76 | #ifndef _USE_LFN |
| 75 | #define _USE_LFN 0 | 77 | #define _USE_LFN 0 |
| @@ -827,7 +829,7 @@ IT_set_face (int face) | |||
| 827 | bg = tem2; | 829 | bg = tem2; |
| 828 | } | 830 | } |
| 829 | if (tty->termscript) | 831 | if (tty->termscript) |
| 830 | fprintf (tty->termscript, "<FACE %d: %d/%d[FG:%d/BG:%d]>", face, | 832 | fprintf (tty->termscript, "<FACE %d: %lu/%lu[FG:%lu/BG:%lu]>", face, |
| 831 | fp->foreground, fp->background, fg, bg); | 833 | fp->foreground, fp->background, fg, bg); |
| 832 | if (fg >= 0 && fg < 16) | 834 | if (fg >= 0 && fg < 16) |
| 833 | { | 835 | { |
| @@ -859,12 +861,6 @@ IT_write_glyphs (struct frame *f, struct glyph *str, int str_len) | |||
| 859 | struct frame *sf; | 861 | struct frame *sf; |
| 860 | unsigned char *conversion_buffer; | 862 | unsigned char *conversion_buffer; |
| 861 | 863 | ||
| 862 | /* Do we need to consider conversion of unibyte characters to | ||
| 863 | multibyte? */ | ||
| 864 | int convert_unibyte_characters | ||
| 865 | = (NILP (current_buffer->enable_multibyte_characters) | ||
| 866 | && unibyte_display_via_language_environment); | ||
| 867 | |||
| 868 | /* If terminal_coding does any conversion, use it, otherwise use | 864 | /* If terminal_coding does any conversion, use it, otherwise use |
| 869 | safe_terminal_coding. We can't use CODING_REQUIRE_ENCODING here | 865 | safe_terminal_coding. We can't use CODING_REQUIRE_ENCODING here |
| 870 | because it always returns 1 if terminal_coding.src_multibyte is 1. */ | 866 | because it always returns 1 if terminal_coding.src_multibyte is 1. */ |
| @@ -1180,8 +1176,6 @@ fast_find_position (struct window *w, int pos, int *hpos, int *vpos) | |||
| 1180 | static void | 1176 | static void |
| 1181 | IT_note_mode_line_highlight (struct window *w, int x, int mode_line_p) | 1177 | IT_note_mode_line_highlight (struct window *w, int x, int mode_line_p) |
| 1182 | { | 1178 | { |
| 1183 | struct frame *f = XFRAME (w->frame); | ||
| 1184 | struct tty_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | ||
| 1185 | struct glyph_row *row; | 1179 | struct glyph_row *row; |
| 1186 | 1180 | ||
| 1187 | if (mode_line_p) | 1181 | if (mode_line_p) |
| @@ -1192,7 +1186,7 @@ IT_note_mode_line_highlight (struct window *w, int x, int mode_line_p) | |||
| 1192 | if (row->enabled_p) | 1186 | if (row->enabled_p) |
| 1193 | { | 1187 | { |
| 1194 | struct glyph *glyph, *end; | 1188 | struct glyph *glyph, *end; |
| 1195 | Lisp_Object help, map; | 1189 | Lisp_Object help; |
| 1196 | 1190 | ||
| 1197 | /* Find the glyph under X. */ | 1191 | /* Find the glyph under X. */ |
| 1198 | glyph = (row->glyphs[TEXT_AREA] | 1192 | glyph = (row->glyphs[TEXT_AREA] |
| @@ -1873,6 +1867,8 @@ IT_delete_glyphs (struct frame *f, int n) | |||
| 1873 | void | 1867 | void |
| 1874 | x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) | 1868 | x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 1875 | { | 1869 | { |
| 1870 | extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); | ||
| 1871 | |||
| 1876 | set_menu_bar_lines (f, value, oldval); | 1872 | set_menu_bar_lines (f, value, oldval); |
| 1877 | } | 1873 | } |
| 1878 | 1874 | ||
| @@ -1939,7 +1935,7 @@ IT_set_terminal_modes (struct terminal *term) | |||
| 1939 | already point to the relocated buffer address returned by | 1935 | already point to the relocated buffer address returned by |
| 1940 | the Int 10h/AX=FEh call above. DJGPP v2.02 and later sets | 1936 | the Int 10h/AX=FEh call above. DJGPP v2.02 and later sets |
| 1941 | ScreenPrimary to that address at startup under DOS/V. */ | 1937 | ScreenPrimary to that address at startup under DOS/V. */ |
| 1942 | if (regs.x.es != (ScreenPrimary >> 4) & 0xffff) | 1938 | if (regs.x.es != ((ScreenPrimary >> 4) & 0xffff)) |
| 1943 | screen_old_address = ScreenPrimary; | 1939 | screen_old_address = ScreenPrimary; |
| 1944 | screen_virtual_segment = regs.x.es; | 1940 | screen_virtual_segment = regs.x.es; |
| 1945 | screen_virtual_offset = regs.x.di; | 1941 | screen_virtual_offset = regs.x.di; |
| @@ -2056,6 +2052,8 @@ DEFUN ("msdos-remember-default-colors", Fmsdos_remember_default_colors, | |||
| 2056 | frame colors are reversed. */ | 2052 | frame colors are reversed. */ |
| 2057 | initial_screen_colors[0] = FRAME_FOREGROUND_PIXEL (f); | 2053 | initial_screen_colors[0] = FRAME_FOREGROUND_PIXEL (f); |
| 2058 | initial_screen_colors[1] = FRAME_BACKGROUND_PIXEL (f); | 2054 | initial_screen_colors[1] = FRAME_BACKGROUND_PIXEL (f); |
| 2055 | |||
| 2056 | return Qnil; | ||
| 2059 | } | 2057 | } |
| 2060 | 2058 | ||
| 2061 | void | 2059 | void |
| @@ -2071,7 +2069,6 @@ IT_set_frame_parameters (struct frame *f, Lisp_Object alist) | |||
| 2071 | int reverse = EQ (Fcdr (Fassq (Qreverse, f->param_alist)), Qt); | 2069 | int reverse = EQ (Fcdr (Fassq (Qreverse, f->param_alist)), Qt); |
| 2072 | int redraw = 0, fg_set = 0, bg_set = 0; | 2070 | int redraw = 0, fg_set = 0, bg_set = 0; |
| 2073 | unsigned long orig_fg, orig_bg; | 2071 | unsigned long orig_fg, orig_bg; |
| 2074 | Lisp_Object frame_bg, frame_fg; | ||
| 2075 | struct tty_display_info *tty = FRAME_TTY (f); | 2072 | struct tty_display_info *tty = FRAME_TTY (f); |
| 2076 | 2073 | ||
| 2077 | /* If we are creating a new frame, begin with the original screen colors | 2074 | /* If we are creating a new frame, begin with the original screen colors |
| @@ -2195,9 +2192,10 @@ IT_set_frame_parameters (struct frame *f, Lisp_Object alist) | |||
| 2195 | IT_set_cursor_type (f, val); | 2192 | IT_set_cursor_type (f, val); |
| 2196 | if (tty->termscript) | 2193 | if (tty->termscript) |
| 2197 | fprintf (tty->termscript, "<CTYPE: %s>\n", | 2194 | fprintf (tty->termscript, "<CTYPE: %s>\n", |
| 2198 | EQ (val, Qbar) || EQ (val, Qhbar) | 2195 | EQ (val, Qbar) |
| 2199 | || CONSP (val) && (EQ (XCAR (val), Qbar) | 2196 | || EQ (val, Qhbar) |
| 2200 | || EQ (XCAR (val), Qhbar)) | 2197 | || (CONSP (val) && (EQ (XCAR (val), Qbar) |
| 2198 | || EQ (XCAR (val), Qhbar))) | ||
| 2201 | ? "bar" : "box"); | 2199 | ? "bar" : "box"); |
| 2202 | } | 2200 | } |
| 2203 | else if (EQ (prop, Qtty_type)) | 2201 | else if (EQ (prop, Qtty_type)) |
| @@ -2214,8 +2212,6 @@ IT_set_frame_parameters (struct frame *f, Lisp_Object alist) | |||
| 2214 | the current frame colors. */ | 2212 | the current frame colors. */ |
| 2215 | if (reverse) | 2213 | if (reverse) |
| 2216 | { | 2214 | { |
| 2217 | Lisp_Object frame; | ||
| 2218 | |||
| 2219 | if (!fg_set) | 2215 | if (!fg_set) |
| 2220 | { | 2216 | { |
| 2221 | FRAME_FOREGROUND_PIXEL (f) = orig_bg; | 2217 | FRAME_FOREGROUND_PIXEL (f) = orig_bg; |
| @@ -2532,11 +2528,11 @@ static struct keyboard_layout_list | |||
| 2532 | struct dos_keyboard_map *keyboard_map; | 2528 | struct dos_keyboard_map *keyboard_map; |
| 2533 | } keyboard_layout_list[] = | 2529 | } keyboard_layout_list[] = |
| 2534 | { | 2530 | { |
| 2535 | 1, &us_keyboard, | 2531 | { 1, &us_keyboard }, |
| 2536 | 33, &fr_keyboard, | 2532 | { 33, &fr_keyboard }, |
| 2537 | 39, &it_keyboard, | 2533 | { 39, &it_keyboard }, |
| 2538 | 45, &dk_keyboard, | 2534 | { 45, &dk_keyboard }, |
| 2539 | 81, &jp_keyboard | 2535 | { 81, &jp_keyboard } |
| 2540 | }; | 2536 | }; |
| 2541 | 2537 | ||
| 2542 | static struct dos_keyboard_map *keyboard; | 2538 | static struct dos_keyboard_map *keyboard; |
| @@ -2581,17 +2577,17 @@ static struct | |||
| 2581 | unsigned char keypad_code; /* keypad code */ | 2577 | unsigned char keypad_code; /* keypad code */ |
| 2582 | unsigned char editkey_code; /* edit key */ | 2578 | unsigned char editkey_code; /* edit key */ |
| 2583 | } keypad_translate_map[] = { | 2579 | } keypad_translate_map[] = { |
| 2584 | '0', '0', 0xb0, /* kp-0 */ 0x63, /* insert */ | 2580 | { '0', '0', 0xb0, /* kp-0 */ 0x63 /* insert */ }, |
| 2585 | '1', '1', 0xb1, /* kp-1 */ 0x57, /* end */ | 2581 | { '1', '1', 0xb1, /* kp-1 */ 0x57 /* end */ }, |
| 2586 | '2', '2', 0xb2, /* kp-2 */ 0x54, /* down */ | 2582 | { '2', '2', 0xb2, /* kp-2 */ 0x54 /* down */ }, |
| 2587 | '3', '3', 0xb3, /* kp-3 */ 0x56, /* next */ | 2583 | { '3', '3', 0xb3, /* kp-3 */ 0x56 /* next */ }, |
| 2588 | '4', '4', 0xb4, /* kp-4 */ 0x51, /* left */ | 2584 | { '4', '4', 0xb4, /* kp-4 */ 0x51 /* left */ }, |
| 2589 | '5', '5', 0xb5, /* kp-5 */ 0xb5, /* kp-5 */ | 2585 | { '5', '5', 0xb5, /* kp-5 */ 0xb5 /* kp-5 */ }, |
| 2590 | '6', '6', 0xb6, /* kp-6 */ 0x53, /* right */ | 2586 | { '6', '6', 0xb6, /* kp-6 */ 0x53 /* right */ }, |
| 2591 | '7', '7', 0xb7, /* kp-7 */ 0x50, /* home */ | 2587 | { '7', '7', 0xb7, /* kp-7 */ 0x50 /* home */ }, |
| 2592 | '8', '8', 0xb8, /* kp-8 */ 0x52, /* up */ | 2588 | { '8', '8', 0xb8, /* kp-8 */ 0x52 /* up */ }, |
| 2593 | '9', '9', 0xb9, /* kp-9 */ 0x55, /* prior */ | 2589 | { '9', '9', 0xb9, /* kp-9 */ 0x55 /* prior */ }, |
| 2594 | '.', '-', 0xae, /* kp-decimal */ 0xff /* delete */ | 2590 | { '.', '-', 0xae, /* kp-decimal */ 0xff /* delete */} |
| 2595 | }; | 2591 | }; |
| 2596 | 2592 | ||
| 2597 | static struct | 2593 | static struct |
| @@ -2599,11 +2595,11 @@ static struct | |||
| 2599 | unsigned char char_code; /* normal code */ | 2595 | unsigned char char_code; /* normal code */ |
| 2600 | unsigned char keypad_code; /* keypad code */ | 2596 | unsigned char keypad_code; /* keypad code */ |
| 2601 | } grey_key_translate_map[] = { | 2597 | } grey_key_translate_map[] = { |
| 2602 | '/', 0xaf, /* kp-decimal */ | 2598 | { '/', 0xaf /* kp-decimal */ }, |
| 2603 | '*', 0xaa, /* kp-multiply */ | 2599 | { '*', 0xaa /* kp-multiply */ }, |
| 2604 | '-', 0xad, /* kp-subtract */ | 2600 | { '-', 0xad /* kp-subtract */ }, |
| 2605 | '+', 0xab, /* kp-add */ | 2601 | { '+', 0xab /* kp-add */ }, |
| 2606 | '\r', 0x8d /* kp-enter */ | 2602 | { '\r', 0x8d /* kp-enter */ } |
| 2607 | }; | 2603 | }; |
| 2608 | 2604 | ||
| 2609 | static unsigned short | 2605 | static unsigned short |
| @@ -3129,7 +3125,6 @@ dos_rawgetc (void) | |||
| 3129 | break; | 3125 | break; |
| 3130 | } | 3126 | } |
| 3131 | 3127 | ||
| 3132 | make_event: | ||
| 3133 | if (code == 0) | 3128 | if (code == 0) |
| 3134 | continue; | 3129 | continue; |
| 3135 | 3130 | ||
| @@ -3237,14 +3232,14 @@ dos_rawgetc (void) | |||
| 3237 | /* If only one button is pressed, wait 100 msec and | 3232 | /* If only one button is pressed, wait 100 msec and |
| 3238 | check again. This way, Speedy Gonzales isn't | 3233 | check again. This way, Speedy Gonzales isn't |
| 3239 | punished, while the slow get their chance. */ | 3234 | punished, while the slow get their chance. */ |
| 3240 | if (press && mouse_pressed (1-but, &x2, &y2) | 3235 | if ((press && mouse_pressed (1-but, &x2, &y2)) |
| 3241 | || !press && mouse_released (1-but, &x2, &y2)) | 3236 | || (!press && mouse_released (1-but, &x2, &y2))) |
| 3242 | button_num = 2; | 3237 | button_num = 2; |
| 3243 | else | 3238 | else |
| 3244 | { | 3239 | { |
| 3245 | delay (100); | 3240 | delay (100); |
| 3246 | if (press && mouse_pressed (1-but, &x2, &y2) | 3241 | if ((press && mouse_pressed (1-but, &x2, &y2)) |
| 3247 | || !press && mouse_released (1-but, &x2, &y2)) | 3242 | || (!press && mouse_released (1-but, &x2, &y2))) |
| 3248 | button_num = 2; | 3243 | button_num = 2; |
| 3249 | } | 3244 | } |
| 3250 | } | 3245 | } |
| @@ -3680,10 +3675,12 @@ XMenuActivate (Display *foo, XMenu *menu, int *pane, int *selidx, | |||
| 3680 | if (0 <= dy && dy < state[i].menu->count) | 3675 | if (0 <= dy && dy < state[i].menu->count) |
| 3681 | { | 3676 | { |
| 3682 | if (!state[i].menu->submenu[dy]) | 3677 | if (!state[i].menu->submenu[dy]) |
| 3683 | if (state[i].menu->panenumber[dy]) | 3678 | { |
| 3684 | result = XM_SUCCESS; | 3679 | if (state[i].menu->panenumber[dy]) |
| 3685 | else | 3680 | result = XM_SUCCESS; |
| 3686 | result = XM_IA_SELECT; | 3681 | else |
| 3682 | result = XM_IA_SELECT; | ||
| 3683 | } | ||
| 3687 | *pane = state[i].pane - 1; | 3684 | *pane = state[i].pane - 1; |
| 3688 | *selidx = dy; | 3685 | *selidx = dy; |
| 3689 | /* We hit some part of a menu, so drop extra menus that | 3686 | /* We hit some part of a menu, so drop extra menus that |
| @@ -4181,7 +4178,7 @@ dos_ttraw (struct tty_display_info *tty) | |||
| 4181 | /* If we are called for the initial terminal, it's too early to do | 4178 | /* If we are called for the initial terminal, it's too early to do |
| 4182 | anything, and termscript isn't set up. */ | 4179 | anything, and termscript isn't set up. */ |
| 4183 | if (tty->terminal->type == output_initial) | 4180 | if (tty->terminal->type == output_initial) |
| 4184 | return; | 4181 | return 2; |
| 4185 | 4182 | ||
| 4186 | break_stat = getcbrk (); | 4183 | break_stat = getcbrk (); |
| 4187 | setcbrk (0); | 4184 | setcbrk (0); |
| @@ -4367,7 +4364,7 @@ run_msdos_command (unsigned char **argv, const char *working_dir, | |||
| 4367 | result = 0; /* emulate Unixy shell behavior with empty cmd line */ | 4364 | result = 0; /* emulate Unixy shell behavior with empty cmd line */ |
| 4368 | } | 4365 | } |
| 4369 | else | 4366 | else |
| 4370 | result = spawnve (P_WAIT, argv[0], argv, envv); | 4367 | result = spawnve (P_WAIT, argv[0], (char **)argv, envv); |
| 4371 | 4368 | ||
| 4372 | dup2 (inbak, 0); | 4369 | dup2 (inbak, 0); |
| 4373 | dup2 (outbak, 1); | 4370 | dup2 (outbak, 1); |
diff --git a/src/unexcoff.c b/src/unexcoff.c index ed319ec8e7f..3e9786348c3 100644 --- a/src/unexcoff.c +++ b/src/unexcoff.c | |||
| @@ -74,12 +74,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 74 | * of Dell Computer Corporation. james@bigtex.cactus.org. | 74 | * of Dell Computer Corporation. james@bigtex.cactus.org. |
| 75 | */ | 75 | */ |
| 76 | 76 | ||
| 77 | #ifndef emacs | ||
| 78 | #define PERROR(arg) perror (arg); return -1 | ||
| 79 | #else | ||
| 80 | #include <config.h> | 77 | #include <config.h> |
| 81 | #define PERROR(file) report_error (file, new) | 78 | #define PERROR(file) report_error (file, new) |
| 82 | #endif | ||
| 83 | 79 | ||
| 84 | #ifndef CANNOT_DUMP /* all rest of file! */ | 80 | #ifndef CANNOT_DUMP /* all rest of file! */ |
| 85 | 81 | ||
| @@ -132,7 +128,6 @@ struct aouthdr | |||
| 132 | #endif | 128 | #endif |
| 133 | 129 | ||
| 134 | 130 | ||
| 135 | extern char *start_of_text (); /* Start of text */ | ||
| 136 | extern char *start_of_data (); /* Start of initialized data */ | 131 | extern char *start_of_data (); /* Start of initialized data */ |
| 137 | 132 | ||
| 138 | static long block_copy_start; /* Old executable start point */ | 133 | static long block_copy_start; /* Old executable start point */ |
| @@ -155,8 +150,6 @@ static int pagemask; | |||
| 155 | 150 | ||
| 156 | #define ADDR_CORRECT(x) ((char *)(x) - (char*)0) | 151 | #define ADDR_CORRECT(x) ((char *)(x) - (char*)0) |
| 157 | 152 | ||
| 158 | #ifdef emacs | ||
| 159 | |||
| 160 | #include <setjmp.h> | 153 | #include <setjmp.h> |
| 161 | #include "lisp.h" | 154 | #include "lisp.h" |
| 162 | 155 | ||
| @@ -169,7 +162,6 @@ report_error (file, fd) | |||
| 169 | close (fd); | 162 | close (fd); |
| 170 | report_file_error ("Cannot unexec", Fcons (build_string (file), Qnil)); | 163 | report_file_error ("Cannot unexec", Fcons (build_string (file), Qnil)); |
| 171 | } | 164 | } |
| 172 | #endif /* emacs */ | ||
| 173 | 165 | ||
| 174 | #define ERROR0(msg) report_error_1 (new, msg, 0, 0); return -1 | 166 | #define ERROR0(msg) report_error_1 (new, msg, 0, 0); return -1 |
| 175 | #define ERROR1(msg,x) report_error_1 (new, msg, x, 0); return -1 | 167 | #define ERROR1(msg,x) report_error_1 (new, msg, x, 0); return -1 |
| @@ -182,12 +174,7 @@ report_error_1 (fd, msg, a1, a2) | |||
| 182 | int a1, a2; | 174 | int a1, a2; |
| 183 | { | 175 | { |
| 184 | close (fd); | 176 | close (fd); |
| 185 | #ifdef emacs | ||
| 186 | error (msg, a1, a2); | 177 | error (msg, a1, a2); |
| 187 | #else | ||
| 188 | fprintf (stderr, msg, a1, a2); | ||
| 189 | fprintf (stderr, "\n"); | ||
| 190 | #endif | ||
| 191 | } | 178 | } |
| 192 | 179 | ||
| 193 | static int make_hdr (); | 180 | static int make_hdr (); |
| @@ -319,9 +306,6 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) | |||
| 319 | to correspond to what we want to dump. */ | 306 | to correspond to what we want to dump. */ |
| 320 | 307 | ||
| 321 | f_hdr.f_flags |= (F_RELFLG | F_EXEC); | 308 | f_hdr.f_flags |= (F_RELFLG | F_EXEC); |
| 322 | f_ohdr.text_start = (long) start_of_text (); | ||
| 323 | f_ohdr.tsize = data_start - f_ohdr.text_start; | ||
| 324 | f_ohdr.data_start = data_start; | ||
| 325 | f_ohdr.dsize = bss_start - f_ohdr.data_start; | 309 | f_ohdr.dsize = bss_start - f_ohdr.data_start; |
| 326 | f_ohdr.bsize = bss_end - bss_start; | 310 | f_ohdr.bsize = bss_end - bss_start; |
| 327 | f_thdr.s_size = f_ohdr.tsize; | 311 | f_thdr.s_size = f_ohdr.tsize; |
| @@ -417,16 +401,6 @@ write_segment (new, ptr, end) | |||
| 417 | nwrite = pagesize; | 401 | nwrite = pagesize; |
| 418 | write (new, zeros, nwrite); | 402 | write (new, zeros, nwrite); |
| 419 | } | 403 | } |
| 420 | #if 0 /* Now that we have can ask `write' to write more than a page, | ||
| 421 | it is legit for write do less than the whole amount specified. */ | ||
| 422 | else if (nwrite != ret) | ||
| 423 | { | ||
| 424 | sprintf (buf, | ||
| 425 | "unexec write failure: addr 0x%x, fileno %d, size 0x%x, wrote 0x%x, errno %d", | ||
| 426 | ptr, new, nwrite, ret, errno); | ||
| 427 | PERROR (buf); | ||
| 428 | } | ||
| 429 | #endif | ||
| 430 | i += nwrite; | 404 | i += nwrite; |
| 431 | ptr += nwrite; | 405 | ptr += nwrite; |
| 432 | } | 406 | } |
| @@ -606,21 +580,6 @@ adjust_lnnoptrs (writedesc, readdesc, new_name) | |||
| 606 | return 0; | 580 | return 0; |
| 607 | } | 581 | } |
| 608 | 582 | ||
| 609 | extern unsigned start __asm__ ("start"); | ||
| 610 | |||
| 611 | /* | ||
| 612 | * Return the address of the start of the text segment prior to | ||
| 613 | * doing an unexec. After unexec the return value is undefined. | ||
| 614 | * See crt0.c for further explanation and _start. | ||
| 615 | * | ||
| 616 | */ | ||
| 617 | |||
| 618 | char * | ||
| 619 | start_of_text (void) | ||
| 620 | { | ||
| 621 | return ((char *) &start); | ||
| 622 | } | ||
| 623 | |||
| 624 | /* **************************************************************** | 583 | /* **************************************************************** |
| 625 | * unexec | 584 | * unexec |
| 626 | * | 585 | * |
diff --git a/src/w16select.c b/src/w16select.c index 384b82ceff1..ef1b974752b 100644 --- a/src/w16select.c +++ b/src/w16select.c | |||
| @@ -456,7 +456,7 @@ DEFUN ("w16-set-clipboard-data", Fw16_set_clipboard_data, Sw16_set_clipboard_dat | |||
| 456 | (Lisp_Object string, Lisp_Object frame) | 456 | (Lisp_Object string, Lisp_Object frame) |
| 457 | { | 457 | { |
| 458 | unsigned ok = 1, put_status = 0; | 458 | unsigned ok = 1, put_status = 0; |
| 459 | int nbytes, charset_info, no_crlf_conversion; | 459 | int nbytes, no_crlf_conversion; |
| 460 | unsigned char *src, *dst = NULL; | 460 | unsigned char *src, *dst = NULL; |
| 461 | 461 | ||
| 462 | CHECK_STRING (string); | 462 | CHECK_STRING (string); |
| @@ -494,9 +494,7 @@ DEFUN ("w16-set-clipboard-data", Fw16_set_clipboard_data, Sw16_set_clipboard_dat | |||
| 494 | { | 494 | { |
| 495 | /* We must encode contents of STRING according to what | 495 | /* We must encode contents of STRING according to what |
| 496 | clipboard-coding-system specifies. */ | 496 | clipboard-coding-system specifies. */ |
| 497 | int bufsize; | ||
| 498 | struct coding_system coding; | 497 | struct coding_system coding; |
| 499 | unsigned char *htext2; | ||
| 500 | Lisp_Object coding_system = | 498 | Lisp_Object coding_system = |
| 501 | NILP (Vnext_selection_coding_system) ? | 499 | NILP (Vnext_selection_coding_system) ? |
| 502 | Vselection_coding_system : Vnext_selection_coding_system; | 500 | Vselection_coding_system : Vnext_selection_coding_system; |
| @@ -567,7 +565,7 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat | |||
| 567 | unsigned data_size, truelen; | 565 | unsigned data_size, truelen; |
| 568 | unsigned char *htext = NULL; | 566 | unsigned char *htext = NULL; |
| 569 | Lisp_Object ret = Qnil; | 567 | Lisp_Object ret = Qnil; |
| 570 | int no_crlf_conversion, require_decoding = 0; | 568 | int require_decoding = 0; |
| 571 | 569 | ||
| 572 | if (NILP (frame)) | 570 | if (NILP (frame)) |
| 573 | frame = Fselected_frame (); | 571 | frame = Fselected_frame (); |
| @@ -608,8 +606,6 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat | |||
| 608 | } | 606 | } |
| 609 | if (require_decoding) | 607 | if (require_decoding) |
| 610 | { | 608 | { |
| 611 | int bufsize; | ||
| 612 | unsigned char *buf; | ||
| 613 | struct coding_system coding; | 609 | struct coding_system coding; |
| 614 | Lisp_Object coding_system = Vnext_selection_coding_system; | 610 | Lisp_Object coding_system = Vnext_selection_coding_system; |
| 615 | 611 | ||
diff --git a/src/xmenu.c b/src/xmenu.c index 0f42a5f0892..68b442388a5 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -2243,7 +2243,7 @@ pop_down_menu (Lisp_Object arg) | |||
| 2243 | 2243 | ||
| 2244 | Lisp_Object | 2244 | Lisp_Object |
| 2245 | xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, | 2245 | xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, |
| 2246 | Lisp_Object title, char **error, EMACS_UINT timestamp) | 2246 | Lisp_Object title, const char **error, EMACS_UINT timestamp) |
| 2247 | { | 2247 | { |
| 2248 | Window root; | 2248 | Window root; |
| 2249 | XMenu *menu; | 2249 | XMenu *menu; |