diff options
author | Andrew Innes <andrewi@gnu.org> | 2000-08-22 22:53:00 +0000 |
---|---|---|
committer | Andrew Innes <andrewi@gnu.org> | 2000-08-22 22:53:00 +0000 |
commit | 84f5bd8132890c09374d81b313408201b141df1f (patch) | |
tree | 4081ee1ee46e51f5350d77de6577c3d8e8c3106c /src/w32console.c | |
parent | cc26af7500300b129263b51a5f9dd2379ed74e4a (diff) | |
download | emacs-84f5bd8132890c09374d81b313408201b141df1f.tar.gz emacs-84f5bd8132890c09374d81b313408201b141df1f.tar.bz2 emacs-84f5bd8132890c09374d81b313408201b141df1f.zip |
(min): Define macro.
(clear_frame, write_glyphs): Fix compile warning.
Diffstat (limited to 'src/w32console.c')
-rw-r--r-- | src/w32console.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/w32console.c b/src/w32console.c index 2f94985367b..55adc0dda9a 100644 --- a/src/w32console.c +++ b/src/w32console.c @@ -41,6 +41,8 @@ Boston, MA 02111-1307, USA. #include "w32inevt.h" #include "dispextern.h" +#define min(a, b) ((a) < (b) ? (a) : (b)) + /* from window.c */ extern Lisp_Object Frecenter (); @@ -134,7 +136,8 @@ clear_frame (void) { struct frame * f = PICK_FRAME (); COORD dest; - int n, r; + int n; + DWORD r; CONSOLE_SCREEN_BUFFER_INFO info; GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info); @@ -338,7 +341,8 @@ insert_glyphs (register struct glyph *start, register int len) void write_glyphs (register struct glyph *string, register int len) { - int produced, consumed, i; + int produced, consumed; + DWORD r; struct frame * f = PICK_FRAME (); WORD char_attr; unsigned char conversion_buffer[1024]; @@ -376,7 +380,7 @@ write_glyphs (register struct glyph *string, register int len) { /* Set the attribute for these characters. */ if (!FillConsoleOutputAttribute (cur_screen, char_attr, - produced, cursor_coords, &i)) + produced, cursor_coords, &r)) { printf ("Failed writing console attributes: %d\n", GetLastError ()); @@ -385,7 +389,7 @@ write_glyphs (register struct glyph *string, register int len) /* Write the characters. */ if (!WriteConsoleOutputCharacter (cur_screen, conversion_buffer, - produced, cursor_coords, &i)) + produced, cursor_coords, &r)) { printf ("Failed writing console characters: %d\n", GetLastError ()); @@ -411,7 +415,7 @@ write_glyphs (register struct glyph *string, register int len) { if (!FillConsoleOutputAttribute (cur_screen, char_attr_normal, terminal_coding.produced, - cursor_coords, &i)) + cursor_coords, &r)) { printf ("Failed writing console attributes: %d\n", GetLastError ()); @@ -420,7 +424,7 @@ write_glyphs (register struct glyph *string, register int len) /* Write the characters. */ if (!WriteConsoleOutputCharacter (cur_screen, conversion_buffer, - produced, cursor_coords, &i)) + produced, cursor_coords, &r)) { printf ("Failed writing console characters: %d\n", GetLastError ()); |