mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-15 09:43:31 +00:00
207 lines
6.0 KiB
Diff
207 lines
6.0 KiB
Diff
|
diff -r -u dtl_orig/dt2dv.c dtl/dt2dv.c
|
||
|
--- dtl_orig/dt2dv.c 1995-03-08 01:00:00.000000000 +0000
|
||
|
+++ dtl/dt2dv.c 2006-03-02 19:05:02.000000000 +0000
|
||
|
@@ -1,9 +1,11 @@
|
||
|
/* dt2dv - convert human-readable "DTL" file to DVI format
|
||
|
- this is intended to invert dv2dt version 0.6.0
|
||
|
- - version 0.6.1 - 14:38 GMT +11 Thu 9 March 1995
|
||
|
+ - version 0.6.2 - 27 July 2005
|
||
|
- 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".
|
||
|
@@ -2223,7 +2225,7 @@
|
||
|
/* 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)
|
||
|
@@ -2232,12 +2234,13 @@
|
||
|
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;
|
||
|
@@ -2567,7 +2570,7 @@
|
||
|
#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
|
||
|
diff -r -u dtl_orig/Makefile dtl/Makefile
|
||
|
--- dtl_orig/Makefile 1995-03-08 01:00:00.000000000 +0000
|
||
|
+++ dtl/Makefile 2006-07-07 14:56:12.000000000 +0100
|
||
|
@@ -3,6 +3,14 @@
|
||
|
# Thu 9 March 1995
|
||
|
# Geoffrey Tobin
|
||
|
# Nelson H. F. Beebe
|
||
|
+#
|
||
|
+# Changes 27 July 2005 by Angus Leeming to enable the Makefile to
|
||
|
+# work out of the box on both *nix and Windows machines under
|
||
|
+# the MinSYS environment.
|
||
|
+#
|
||
|
+# The Makefile can also be used unaltered to build a Windows executable
|
||
|
+# from a Linux box if make is invoked as:
|
||
|
+# $ make EXEEXT='.exe' CC='i386-mingw32-gcc'
|
||
|
#=======================================================================
|
||
|
|
||
|
BINDIR = /usr/local/bin
|
||
|
@@ -16,10 +24,22 @@
|
||
|
CP = /bin/cp
|
||
|
DITROFF = ditroff
|
||
|
DITROFF = groff
|
||
|
-EXES = dt2dv dv2dt
|
||
|
+
|
||
|
+# This is a GNU make extension.
|
||
|
+# If you're flavour of make refuses to accept it,
|
||
|
+# then simply hardcode EXEEXT.
|
||
|
+ifeq ($(WINDIR),)
|
||
|
+ EXEEXT =
|
||
|
+else
|
||
|
+ EXEEXT = .exe
|
||
|
+endif
|
||
|
+
|
||
|
+DT2DV = dt2dv$(EXEEXT)
|
||
|
+DV2DT = dv2dt$(EXEEXT)
|
||
|
+EXES = $(DT2DV) $(DV2DT)
|
||
|
LDFLAGS = -s
|
||
|
LDFLAGS =
|
||
|
-MAN2PS = ./man2ps
|
||
|
+MAN2PS = sh ./man2ps
|
||
|
MANDIR = /usr/local/man/man$(MANEXT)
|
||
|
MANEXT = 1
|
||
|
OBJS = dt2dv.o dv2dt.o
|
||
|
@@ -40,7 +60,7 @@
|
||
|
$(DITROFF) -man -Tascii $< | $(COL) >$@
|
||
|
|
||
|
.man.ps:
|
||
|
- $(MAN2PS) < $< > $@
|
||
|
+ $(MAN2PS) $< > $@
|
||
|
|
||
|
#=======================================================================
|
||
|
|
||
|
@@ -48,19 +68,19 @@
|
||
|
|
||
|
doc: dt2dv.hlp dv2dt.hlp dt2dv.ps dv2dt.ps
|
||
|
|
||
|
-dtl: $(EXES)
|
||
|
+dtl: dv2dt dt2dv
|
||
|
|
||
|
check tests: hello example tripvdu edited
|
||
|
|
||
|
dv2dt: dv2dt.o dtl.h
|
||
|
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.o
|
||
|
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(DV2DT) dv2dt.o
|
||
|
|
||
|
dt2dv: dt2dv.o dtl.h
|
||
|
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $@.o
|
||
|
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(DT2DV) dt2dv.o
|
||
|
|
||
|
-hello: hello.dtl $(EXES)
|
||
|
- dt2dv hello.dtl hello2.dvi
|
||
|
- dv2dt hello2.dvi hello2.dtl
|
||
|
+hello: hello.dtl dv2dt dt2dv
|
||
|
+ ./$(DT2DV) hello.dtl hello2.dvi
|
||
|
+ ./$(DV2DT) hello2.dvi hello2.dtl
|
||
|
-@diff hello.dtl hello2.dtl > hello.dif
|
||
|
@if [ -s hello.dif ] ; \
|
||
|
then echo ERROR: differences in hello.dif ; \
|
||
|
@@ -69,11 +89,11 @@
|
||
|
|
||
|
hello.dtl: hello.tex
|
||
|
tex hello
|
||
|
- dv2dt hello.dvi hello.dtl
|
||
|
+ ./$(DV2DT) hello.dvi hello.dtl
|
||
|
|
||
|
-example: example.dtl $(EXES)
|
||
|
- dt2dv example.dtl example2.dvi
|
||
|
- dv2dt example2.dvi example2.dtl
|
||
|
+example: example.dtl dv2dt dt2dv
|
||
|
+ ./$(DT2DV) example.dtl example2.dvi
|
||
|
+ ./$(DV2DT) example2.dvi example2.dtl
|
||
|
-@diff example.dtl example2.dtl > example.dif
|
||
|
@if [ -s example.dif ] ; \
|
||
|
then echo ERROR: differences in example.dif ; \
|
||
|
@@ -82,11 +102,11 @@
|
||
|
|
||
|
example.dtl: example.tex
|
||
|
tex example
|
||
|
- dv2dt example.dvi example.dtl
|
||
|
+ ./$(DV2DT) example.dvi example.dtl
|
||
|
|
||
|
-tripvdu: tripvdu.dtl $(EXES)
|
||
|
- dt2dv tripvdu.dtl tripvdu2.dvi
|
||
|
- dv2dt tripvdu2.dvi tripvdu2.dtl
|
||
|
+tripvdu: tripvdu.dtl dv2dt dt2dv
|
||
|
+ ./$(DT2DV) tripvdu.dtl tripvdu2.dvi
|
||
|
+ ./$(DV2DT) tripvdu2.dvi tripvdu2.dtl
|
||
|
-@diff tripvdu.dtl tripvdu2.dtl > tripvdu.dif
|
||
|
@if [ -s tripvdu.dif ] ; \
|
||
|
then echo ERROR: differences in tripvdu.dif ; \
|
||
|
@@ -95,15 +115,15 @@
|
||
|
|
||
|
tripvdu.dtl: tripvdu.tex
|
||
|
tex tripvdu
|
||
|
- dv2dt tripvdu.dvi tripvdu.dtl
|
||
|
+ ./$(DV2DT) tripvdu.dvi tripvdu.dtl
|
||
|
|
||
|
# edited.txt is already a dtl file.
|
||
|
|
||
|
-edited: edited.txt $(EXES)
|
||
|
- dt2dv edited.txt edited.dvi
|
||
|
- dv2dt edited.dvi edited2.dtl
|
||
|
- dt2dv edited2.dtl edited2.dvi
|
||
|
- dv2dt edited2.dvi edited3.dtl
|
||
|
+edited: edited.txt dv2dt dt2dv
|
||
|
+ ./$(DT2DV) edited.txt edited.dvi
|
||
|
+ ./$(DV2DT) edited.dvi edited2.dtl
|
||
|
+ ./$(DT2DV) edited2.dtl edited2.dvi
|
||
|
+ ./$(DV2DT) edited2.dvi edited3.dtl
|
||
|
@if [ -s edited.dif ] ; \
|
||
|
then echo ERROR : differences in edited.dif ; \
|
||
|
else $(RM) edited.dif ; \
|
||
|
diff -r -u dtl_orig/man2ps dtl/man2ps
|
||
|
--- dtl_orig/man2ps 1993-05-10 02:00:00.000000000 +0100
|
||
|
+++ dtl/man2ps 2006-07-07 15:03:12.000000000 +0100
|
||
|
@@ -20,16 +20,16 @@
|
||
|
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
|
||
|
|
||
|
Only in dtl: .svn
|