2006-09-14 Enrico Forestieri <forenr@lyx.org>

* dt2dv.c: Handle non-ASCII characters.

See https://www.lyx.org/trac/ticket/2836
This commit is contained in:
Juergen Spitzmueller 2020-04-09 09:22:02 +02:00
parent 78a15c0448
commit 8e60fcf530

View File

@ -6,12 +6,13 @@
The author has expressed the hope that any modification will retain enough content to remain useful. He would also appreciate being acknowledged as the original author in the documentation. The author has expressed the hope that any modification will retain enough content to remain useful. He would also appreciate being acknowledged as the original author in the documentation.
This declaration added 2008/11/14 by Clea F. Rees with the permission of Geoffrey Tobin. This declaration added 2008/11/14 by Clea F. Rees with the permission of Geoffrey Tobin.
- version 0.6.1 - 14:38 GMT +11 Thu 9 March 1995 - version 0.6.2 - 14 September 2005
- Geoffrey Tobin G.Tobin@ee.latrobe.edu.au - Geoffrey Tobin G.Tobin@ee.latrobe.edu.au
- fixes: Michal Tomczak-Jaegermann ntomczak@vm.ucs.ualberta.ca - fixes: Michal Tomczak-Jaegermann ntomczak@vm.ucs.ualberta.ca
Nelson H. F. Beebe beebe@math.utah.edu Nelson H. F. Beebe beebe@math.utah.edu
Angus Leeming leeming@lyx.org: Enable dt2dv to handle .dvi files Angus Leeming leeming@lyx.org: Enable dt2dv to handle .dvi files
containing strings longer than 1024 chars. containing strings longer than 1024 chars.
Enrico Forestieri forenr@lyx.org: handle non-ASCII characters.
- Reference: "The DVI Driver Standard, Level 0", - Reference: "The DVI Driver Standard, Level 0",
by The TUG DVI Driver Standards Committee. by The TUG DVI Driver Standards Committee.
Appendix A, "Device-Independent File Format". Appendix A, "Device-Independent File Format".
@ -42,7 +43,7 @@ typedef struct
size_t max; /* capacity of buf */ size_t max; /* capacity of buf */
S4 wrote; /* number of characters written into buf */ S4 wrote; /* number of characters written into buf */
size_t read; /* position in buf of next character to read from buf */ size_t read; /* position in buf of next character to read from buf */
char * buf; /* line buffer */ unsigned char * buf; /* line buffer */
} Line; } Line;
char linebuf[MAXLINE+1]; char linebuf[MAXLINE+1];
@ -1097,7 +1098,7 @@ read_char
dinfo(); dinfo();
status = 0; status = 0;
} }
else if ( ! isprint (c) && ! isspace (c)) else if ( ! isprint (c & 0x7f) && ! isspace (c))
{ {
PRINT_PROGNAME; PRINT_PROGNAME;
fprintf (stderr, fprintf (stderr,