[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/w32console.c [emacs-unicode-2]
From: |
Jason Rumney |
Subject: |
[Emacs-diffs] Changes to emacs/src/w32console.c [emacs-unicode-2] |
Date: |
Sat, 11 Oct 2003 18:24:47 -0400 |
Index: emacs/src/w32console.c
diff -c emacs/src/w32console.c:1.36.4.1 emacs/src/w32console.c:1.36.4.2
*** emacs/src/w32console.c:1.36.4.1 Mon Sep 8 08:48:15 2003
--- emacs/src/w32console.c Sat Oct 11 18:24:47 2003
***************
*** 294,299 ****
--- 294,301 ----
}
}
+ extern unsigned char *terminal_encode_buffer;
+
void
write_glyphs (register struct glyph *string, register int len)
{
***************
*** 301,308 ****
DWORD r;
struct frame * f = PICK_FRAME ();
WORD char_attr;
- unsigned char conversion_buffer[1024];
- int conversion_buffer_size = sizeof conversion_buffer;
if (len <= 0)
return;
--- 303,308 ----
***************
*** 326,336 ****
while (n > 0)
{
! /* We use a fixed size (1024 bytes) of conversion buffer.
! Usually it is sufficient, but if not, we just repeat the
! loop. */
! produced = encode_terminal_code (string, conversion_buffer,
! n, conversion_buffer_size,
&consumed);
if (produced > 0)
{
--- 326,333 ----
while (n > 0)
{
! produced = encode_terminal_code (string,
! n,
&consumed);
if (produced > 0)
{
***************
*** 344,350 ****
}
/* Write the characters. */
! if (!WriteConsoleOutputCharacter (cur_screen, conversion_buffer,
produced, cursor_coords, &r))
{
printf ("Failed writing console characters: %d\n",
--- 341,347 ----
}
/* Write the characters. */
! if (!WriteConsoleOutputCharacter (cur_screen,
terminal_encode_buffer,
produced, cursor_coords, &r))
{
printf ("Failed writing console characters: %d\n",
***************
*** 364,372 ****
/* We may have to output some codes to terminate the writing. */
if (CODING_REQUIRE_FLUSHING (&terminal_coding))
{
terminal_coding.mode |= CODING_MODE_LAST_BLOCK;
! encode_coding (&terminal_coding, "", conversion_buffer,
! 0, conversion_buffer_size);
if (terminal_coding.produced > 0)
{
if (!FillConsoleOutputAttribute (cur_screen, char_attr_normal,
--- 361,373 ----
/* We may have to output some codes to terminate the writing. */
if (CODING_REQUIRE_FLUSHING (&terminal_coding))
{
+ Lisp_Object blank_string = build_string ("");
+ int conversion_buffer_size = 1024;
+
terminal_coding.mode |= CODING_MODE_LAST_BLOCK;
! terminal_coding.destination = (unsigned char *) xmalloc
(conversion_buffer_size);
! encode_coding_object (&terminal_coding, blank_string, 0, 0,
! 0, conversion_buffer_size, Qnil);
if (terminal_coding.produced > 0)
{
if (!FillConsoleOutputAttribute (cur_screen, char_attr_normal,
***************
*** 379,385 ****
}
/* Write the characters. */
! if (!WriteConsoleOutputCharacter (cur_screen, conversion_buffer,
produced, cursor_coords, &r))
{
printf ("Failed writing console characters: %d\n",
--- 380,386 ----
}
/* Write the characters. */
! if (!WriteConsoleOutputCharacter (cur_screen,
terminal_coding.destination,
produced, cursor_coords, &r))
{
printf ("Failed writing console characters: %d\n",
***************
*** 387,392 ****
--- 388,394 ----
fflush (stdout);
}
}
+ xfree (terminal_coding.destination);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/w32console.c [emacs-unicode-2],
Jason Rumney <=