aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Innes2000-08-22 22:53:00 +0000
committerAndrew Innes2000-08-22 22:53:00 +0000
commit84f5bd8132890c09374d81b313408201b141df1f (patch)
tree4081ee1ee46e51f5350d77de6577c3d8e8c3106c /src
parentcc26af7500300b129263b51a5f9dd2379ed74e4a (diff)
downloademacs-84f5bd8132890c09374d81b313408201b141df1f.tar.gz
emacs-84f5bd8132890c09374d81b313408201b141df1f.zip
(min): Define macro.
(clear_frame, write_glyphs): Fix compile warning.
Diffstat (limited to 'src')
-rw-r--r--src/w32console.c16
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.
41#include "w32inevt.h" 41#include "w32inevt.h"
42#include "dispextern.h" 42#include "dispextern.h"
43 43
44#define min(a, b) ((a) < (b) ? (a) : (b))
45
44/* from window.c */ 46/* from window.c */
45extern Lisp_Object Frecenter (); 47extern Lisp_Object Frecenter ();
46 48
@@ -134,7 +136,8 @@ clear_frame (void)
134{ 136{
135 struct frame * f = PICK_FRAME (); 137 struct frame * f = PICK_FRAME ();
136 COORD dest; 138 COORD dest;
137 int n, r; 139 int n;
140 DWORD r;
138 CONSOLE_SCREEN_BUFFER_INFO info; 141 CONSOLE_SCREEN_BUFFER_INFO info;
139 142
140 GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info); 143 GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &info);
@@ -338,7 +341,8 @@ insert_glyphs (register struct glyph *start, register int len)
338void 341void
339write_glyphs (register struct glyph *string, register int len) 342write_glyphs (register struct glyph *string, register int len)
340{ 343{
341 int produced, consumed, i; 344 int produced, consumed;
345 DWORD r;
342 struct frame * f = PICK_FRAME (); 346 struct frame * f = PICK_FRAME ();
343 WORD char_attr; 347 WORD char_attr;
344 unsigned char conversion_buffer[1024]; 348 unsigned char conversion_buffer[1024];
@@ -376,7 +380,7 @@ write_glyphs (register struct glyph *string, register int len)
376 { 380 {
377 /* Set the attribute for these characters. */ 381 /* Set the attribute for these characters. */
378 if (!FillConsoleOutputAttribute (cur_screen, char_attr, 382 if (!FillConsoleOutputAttribute (cur_screen, char_attr,
379 produced, cursor_coords, &i)) 383 produced, cursor_coords, &r))
380 { 384 {
381 printf ("Failed writing console attributes: %d\n", 385 printf ("Failed writing console attributes: %d\n",
382 GetLastError ()); 386 GetLastError ());
@@ -385,7 +389,7 @@ write_glyphs (register struct glyph *string, register int len)
385 389
386 /* Write the characters. */ 390 /* Write the characters. */
387 if (!WriteConsoleOutputCharacter (cur_screen, conversion_buffer, 391 if (!WriteConsoleOutputCharacter (cur_screen, conversion_buffer,
388 produced, cursor_coords, &i)) 392 produced, cursor_coords, &r))
389 { 393 {
390 printf ("Failed writing console characters: %d\n", 394 printf ("Failed writing console characters: %d\n",
391 GetLastError ()); 395 GetLastError ());
@@ -411,7 +415,7 @@ write_glyphs (register struct glyph *string, register int len)
411 { 415 {
412 if (!FillConsoleOutputAttribute (cur_screen, char_attr_normal, 416 if (!FillConsoleOutputAttribute (cur_screen, char_attr_normal,
413 terminal_coding.produced, 417 terminal_coding.produced,
414 cursor_coords, &i)) 418 cursor_coords, &r))
415 { 419 {
416 printf ("Failed writing console attributes: %d\n", 420 printf ("Failed writing console attributes: %d\n",
417 GetLastError ()); 421 GetLastError ());
@@ -420,7 +424,7 @@ write_glyphs (register struct glyph *string, register int len)
420 424
421 /* Write the characters. */ 425 /* Write the characters. */
422 if (!WriteConsoleOutputCharacter (cur_screen, conversion_buffer, 426 if (!WriteConsoleOutputCharacter (cur_screen, conversion_buffer,
423 produced, cursor_coords, &i)) 427 produced, cursor_coords, &r))
424 { 428 {
425 printf ("Failed writing console characters: %d\n", 429 printf ("Failed writing console characters: %d\n",
426 GetLastError ()); 430 GetLastError ());