]> git.lyx.org Git - features.git/commitdiff
2005-07-25 Angus Leeming <leeeming@lyx.org>
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 9 Apr 2020 07:21:05 +0000 (09:21 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:55 +0000 (15:48 +0200)
* dt2dv.c: Enable to handle .dvi files containing strings longer than 1024 chars.

* Makefile: enable the to work out of the box on both *nix and Windows machines
  under the MinSYS environment.

* man2ps: build fixes

See https://marc.info/?l=lyx-devel&m=115228143031699

3rdparty/dtl/dt2dv.c
3rdparty/dtl/man2ps

index 67d4a31aa55b10c2c35bb85ad003eada7b39fd99..bcec4a07a2d99014eb0d94ce51e7bd31694f7685 100644 (file)
@@ -10,6 +10,8 @@
    - 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.
    - Reference:  "The DVI Driver Standard, Level 0",
                  by  The TUG DVI Driver Standards Committee.
                  Appendix A, "Device-Independent File Format".
@@ -2229,7 +2231,7 @@ xfer_len_string
 /* transfer (length and) quoted string from dtl to dvi file, */
 /* return number of bytes written to dvi file. */
 {
-  U4 k, k2;
+  U4 k, k2, lstr_maxsize;
   Lstring lstr;
 
   if (debug)
@@ -2238,12 +2240,13 @@ xfer_len_string
     fprintf (stderr, "(xfer_len_string) : entering xfer_len_string.\n");
   }
 
-  init_Lstring (&lstr, LSIZE);
-
   /* k[n] : length of special string */
 
   k = get_unsigned (dtl);
 
+  lstr_maxsize = (k > LSIZE) ? k : LSIZE;
+  init_Lstring (&lstr, lstr_maxsize);
+
   if (debug)
   {
     PRINT_PROGNAME;
@@ -2573,7 +2576,7 @@ fontdef
 #ifdef HEX_CHECKSUM
   /* c[4] : (hexadecimal) checksum : I (gt) would prefer this */
   xfer_hex (4, dtl, dvi);
-#else /NOT HEX_CHECKSUM */
+#else /*NOT HEX_CHECKSUM */
   /* c[4] : checksum (octal, for comparison with tftopl's .pl file) */
   xfer_oct (4, dtl, dvi);
 #endif
index 47eeb6e39009a2aa92e03e95b5d4879277fc7ad2..97684294a2226b512f8c48934e75a338c0ff5243 100644 (file)
@@ -25,16 +25,16 @@ case `basename $0` in
 esac
 
 # We can use either GNU groff or Sun Solaris troff + dpost
-if [ -x /usr/local/bin/groff ]
+if [ which groff > /dev/null ]
 then   # GNU groff
        TROFF="groff $FORMAT"
        TROFF2PS="cat"
-elif [ -x /usr/lib/lp/postscript/dpost ]
++elif [ which dpost > /dev/null ]
 then   # Solaris 2.1
        TROFF="troff $FORMAT"
        TROFF2PS="/usr/lib/lp/postscript/dpost"
 else
-       echo "Cannot find troff-to-PostScript filter"
++      echo "Cannot find troff-to-PostScript filter" >&2
        exit 1
 fi