]> git.lyx.org Git - lyx.git/blobdiff - 3rdparty/dtl/dt2dv.c
nullptr
[lyx.git] / 3rdparty / dtl / dt2dv.c
index bcec4a07a2d99014eb0d94ce51e7bd31694f7685..265cc84d80e4c9dffd867b868529f5ffcbe0824e 100644 (file)
@@ -6,12 +6,14 @@
    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.
 
-   - version 0.6.1 - 14:38 GMT +11  Thu 9 March 1995
+   - version 0.6.3 - 2020
    - Geoffrey Tobin    G.Tobin@ee.latrobe.edu.au
    - fixes:  Michal Tomczak-Jaegermann    ntomczak@vm.ucs.ualberta.ca
              Nelson H. F. Beebe    beebe@math.utah.edu
             Angus Leeming leeming@lyx.org: Enable dt2dv to handle .dvi files
                  containing strings longer than 1024 chars.
+             Enrico Forestieri forenr@lyx.org: handle non-ASCII characters.
+             Juergen Spitzmueller spitz@lyx.org: fix compiler warnings
    - Reference:  "The DVI Driver Standard, Level 0",
                  by  The TUG DVI Driver Standards Committee.
                  Appendix A, "Device-Independent File Format".
@@ -40,7 +42,7 @@ typedef struct
 {
   COUNT num;    /* current line number */
   size_t max;   /* capacity of buf */
-  S4 wrote;     /* number of characters written into buf */
+  U4 wrote;     /* number of characters written into buf */
   size_t read;  /* position in buf of next character to read from buf */
   char * buf;   /* line buffer */
 } Line;
@@ -1097,7 +1099,7 @@ read_char
       dinfo();
       status = 0;
     }
-    else if ( ! isprint (c) && ! isspace (c))
+    else if ( ! isprint (c & 0x7f) && ! isspace (c))
     {
       PRINT_PROGNAME;
       fprintf (stderr,
@@ -2205,7 +2207,7 @@ put_Lstring
 
   dvi_written += fwret;
 
-  if (fwret < lstr->l)
+  if ((long int) fwret < lstr->l)
   {
     PRINT_PROGNAME;
     fprintf (stderr,