Mercurial > emacs
comparison src/msdos.c @ 16915:8d28d96f6031
(run_msdos_command): Remove unused variables.
(crlf_to_lf): Remove unused variables.
(Fmsdos_downcase_filename): Remove unused variable.
(IT_set_frame_parameters): Declare prototypes for external functions.
(IT_set_frame_parameters): Correct format specifier.
(IT_set_terminal_modes): Remove unused variable.
(top level): Add header files which declare used functions.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Tue, 21 Jan 1997 17:41:30 +0000 |
parents | 1efa81ac7e5a |
children | 4ca0a5e25605 |
comparison
equal
deleted
inserted
replaced
16914:4b79df16b939 | 16915:8d28d96f6031 |
---|---|
31 #include <stdlib.h> | 31 #include <stdlib.h> |
32 #include <sys/param.h> | 32 #include <sys/param.h> |
33 #include <sys/time.h> | 33 #include <sys/time.h> |
34 #include <dos.h> | 34 #include <dos.h> |
35 #include <errno.h> | 35 #include <errno.h> |
36 #include <string.h> /* for bzero and string functions */ | |
36 #include <sys/stat.h> /* for _fixpath */ | 37 #include <sys/stat.h> /* for _fixpath */ |
38 #include <unistd.h> /* for chdir, dup, dup2, etc. */ | |
37 #if __DJGPP__ >= 2 | 39 #if __DJGPP__ >= 2 |
38 #include <fcntl.h> | 40 #include <fcntl.h> |
41 #include <io.h> /* for setmode */ | |
39 #include <dpmi.h> /* for __dpmi_xxx stuff */ | 42 #include <dpmi.h> /* for __dpmi_xxx stuff */ |
40 #include <sys/farptr.h> /* for _farsetsel, _farnspokeb */ | 43 #include <sys/farptr.h> /* for _farsetsel, _farnspokeb */ |
41 #include <libc/dosio.h> /* for _USE_LFN */ | 44 #include <libc/dosio.h> /* for _USE_LFN */ |
45 #include <conio.h> /* for cputs */ | |
42 #endif | 46 #endif |
43 | 47 |
44 #include "dosfns.h" | 48 #include "dosfns.h" |
45 #include "msdos.h" | 49 #include "msdos.h" |
46 #include "systime.h" | 50 #include "systime.h" |
837 resumed, and whenever the screen is redrawn! */ | 841 resumed, and whenever the screen is redrawn! */ |
838 | 842 |
839 static | 843 static |
840 IT_set_terminal_modes (void) | 844 IT_set_terminal_modes (void) |
841 { | 845 { |
842 char *colors; | |
843 FRAME_PTR f; | |
844 struct face *fp; | |
845 | |
846 if (termscript) | 846 if (termscript) |
847 fprintf (termscript, "\n<SET_TERM>"); | 847 fprintf (termscript, "\n<SET_TERM>"); |
848 highlight = 0; | 848 highlight = 0; |
849 | 849 |
850 screen_size_X = ScreenCols (); | 850 screen_size_X = ScreenCols (); |
972 if (new_color != ~0) | 972 if (new_color != ~0) |
973 { | 973 { |
974 FRAME_FOREGROUND_PIXEL (f) = new_color; | 974 FRAME_FOREGROUND_PIXEL (f) = new_color; |
975 redraw = 1; | 975 redraw = 1; |
976 if (termscript) | 976 if (termscript) |
977 fprintf (termscript, "<FGCOLOR %d>\n", new_color); | 977 fprintf (termscript, "<FGCOLOR %lu>\n", new_color); |
978 } | 978 } |
979 } | 979 } |
980 else if (EQ (prop, intern ("background-color"))) | 980 else if (EQ (prop, intern ("background-color"))) |
981 { | 981 { |
982 unsigned long new_color = load_color (f, val); | 982 unsigned long new_color = load_color (f, val); |
983 if (new_color != ~0) | 983 if (new_color != ~0) |
984 { | 984 { |
985 FRAME_BACKGROUND_PIXEL (f) = new_color; | 985 FRAME_BACKGROUND_PIXEL (f) = new_color; |
986 redraw = 1; | 986 redraw = 1; |
987 if (termscript) | 987 if (termscript) |
988 fprintf (termscript, "<BGCOLOR %d>\n", new_color); | 988 fprintf (termscript, "<BGCOLOR %lu>\n", new_color); |
989 } | 989 } |
990 } | 990 } |
991 else if (EQ (prop, intern ("menu-bar-lines"))) | 991 else if (EQ (prop, intern ("menu-bar-lines"))) |
992 x_set_menu_bar_lines (f, val, 0); | 992 x_set_menu_bar_lines (f, val, 0); |
993 } | 993 } |
994 | 994 |
995 if (redraw) | 995 if (redraw) |
996 { | 996 { |
997 extern void recompute_basic_faces (FRAME_PTR); | |
998 extern void redraw_frame (FRAME_PTR); | |
999 | |
997 recompute_basic_faces (f); | 1000 recompute_basic_faces (f); |
998 if (f == selected_frame) | 1001 if (f == selected_frame) |
999 redraw_frame (f); | 1002 redraw_frame (f); |
1000 } | 1003 } |
1001 } | 1004 } |
1005 | |
1006 extern void init_frame_faces (FRAME_PTR); | |
1002 | 1007 |
1003 #endif /* !HAVE_X_WINDOWS */ | 1008 #endif /* !HAVE_X_WINDOWS */ |
1004 | 1009 |
1005 | 1010 |
1006 /* Do we need the internal terminal? */ | 1011 /* Do we need the internal terminal? */ |
1559 return val; | 1564 return val; |
1560 } | 1565 } |
1561 } | 1566 } |
1562 | 1567 |
1563 /* Get a char from keyboard. Function keys are put into the event queue. */ | 1568 /* Get a char from keyboard. Function keys are put into the event queue. */ |
1569 | |
1570 extern void kbd_buffer_store_event (struct input_event *); | |
1564 | 1571 |
1565 static int | 1572 static int |
1566 dos_rawgetc () | 1573 dos_rawgetc () |
1567 { | 1574 { |
1568 struct input_event event; | 1575 struct input_event event; |
2367 register unsigned char *buf; | 2374 register unsigned char *buf; |
2368 { | 2375 { |
2369 unsigned char *np = buf; | 2376 unsigned char *np = buf; |
2370 unsigned char *startp = buf; | 2377 unsigned char *startp = buf; |
2371 unsigned char *endp = buf + n; | 2378 unsigned char *endp = buf + n; |
2372 unsigned char c; | |
2373 | 2379 |
2374 if (n == 0) | 2380 if (n == 0) |
2375 return n; | 2381 return n; |
2376 while (buf < endp - 1) | 2382 while (buf < endp - 1) |
2377 { | 2383 { |
2616 If FILENAME is not a string, returns nil.\n\ | 2622 If FILENAME is not a string, returns nil.\n\ |
2617 The argument object is never altered--the value is a copy.") | 2623 The argument object is never altered--the value is a copy.") |
2618 (filename) | 2624 (filename) |
2619 Lisp_Object filename; | 2625 Lisp_Object filename; |
2620 { | 2626 { |
2621 char *fname; | |
2622 Lisp_Object tem; | 2627 Lisp_Object tem; |
2623 | 2628 |
2624 if (! STRINGP (filename)) | 2629 if (! STRINGP (filename)) |
2625 return Qnil; | 2630 return Qnil; |
2626 | 2631 |
2931 int tempin, tempout, temperr; | 2936 int tempin, tempout, temperr; |
2932 { | 2937 { |
2933 char *saveargv1, *saveargv2, **envv, *lowcase_argv0, *pa, *pl; | 2938 char *saveargv1, *saveargv2, **envv, *lowcase_argv0, *pa, *pl; |
2934 char oldwd[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */ | 2939 char oldwd[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS. */ |
2935 int msshell, result = -1; | 2940 int msshell, result = -1; |
2936 int in, out, inbak, outbak, errbak; | 2941 int inbak, outbak, errbak; |
2937 int x, y; | 2942 int x, y; |
2938 Lisp_Object cmd; | 2943 Lisp_Object cmd; |
2939 | 2944 |
2940 /* Get current directory as MSDOS cwd is not per-process. */ | 2945 /* Get current directory as MSDOS cwd is not per-process. */ |
2941 getwd (oldwd); | 2946 getwd (oldwd); |