diff options
Diffstat (limited to 'groff-1.18-gzip.patch')
-rw-r--r-- | groff-1.18-gzip.patch | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/groff-1.18-gzip.patch b/groff-1.18-gzip.patch index 3d14ff0..96a7483 100644 --- a/groff-1.18-gzip.patch +++ b/groff-1.18-gzip.patch @@ -1,5 +1,5 @@ ---- groff-1.18/src/roff/troff/Makefile.sub.hugo 2002-05-03 00:33:21.000000000 +0200 -+++ groff-1.18/src/roff/troff/Makefile.sub 2002-11-04 21:30:09.000000000 +0100 +--- groff-1.19.1/src/roff/troff/Makefile.sub.gzip 2004-01-06 23:49:05.000000000 +0100 ++++ groff-1.19.1/src/roff/troff/Makefile.sub 2005-01-12 13:49:11.542476528 +0100 @@ -1,6 +1,6 @@ PROG=troff$(EXEEXT) MAN1=troff.n @@ -7,10 +7,10 @@ +XLIBS=-lz $(LIBGROFF) MLIB=$(LIBM) OBJS=\ - env.o \ ---- groff-1.18/src/roff/troff/input.cc.hugo 2002-11-04 21:30:09.000000000 +0100 -+++ groff-1.18/src/roff/troff/input.cc 2002-11-04 21:36:13.000000000 +0100 -@@ -42,6 +42,8 @@ + dictionary.$(OBJEXT) \ +--- groff-1.19.1/src/roff/troff/input.cpp.gzip 2005-01-12 13:49:11.516480480 +0100 ++++ groff-1.19.1/src/roff/troff/input.cpp 2005-01-12 13:57:40.615085728 +0100 +@@ -41,6 +41,8 @@ Foundation, 59 Temple Place - Suite 330, #include "nonposix.h" @@ -19,7 +19,7 @@ #ifdef NEED_DECLARATION_PUTENV extern "C" { int putenv(const char *); -@@ -217,6 +219,130 @@ +@@ -190,6 +192,130 @@ void restore_escape_char() skip_line(); } @@ -150,7 +150,7 @@ class input_iterator { public: input_iterator(); -@@ -236,7 +362,7 @@ +@@ -209,7 +335,7 @@ private: virtual int get_location(int, const char **, int *) { return 0; } virtual void backtrace() {} virtual int set_location(const char *, int) { return 0; } @@ -159,7 +159,7 @@ virtual void shift(int) {} virtual int is_boundary() {return 0; } virtual int internal_level() { return 0; } -@@ -277,7 +403,7 @@ +@@ -250,7 +376,7 @@ public: }; class file_iterator : public input_iterator { @@ -168,7 +168,7 @@ int lineno; const char *filename; int popened; -@@ -286,7 +412,9 @@ +@@ -259,7 +385,9 @@ class file_iterator : public input_itera enum { BUF_SIZE = 512 }; unsigned char buf[BUF_SIZE]; void close(); @@ -178,7 +178,7 @@ file_iterator(FILE *, const char *, int = 0); ~file_iterator(); int fill(node **); -@@ -294,18 +422,30 @@ +@@ -267,18 +395,30 @@ public: int get_location(int, const char **, int *); void backtrace(); int set_location(const char *, int); @@ -213,7 +213,7 @@ } } -@@ -316,6 +456,8 @@ +@@ -289,6 +429,8 @@ file_iterator::~file_iterator() void file_iterator::close() { @@ -222,7 +222,7 @@ if (fp == stdin) clearerr(stdin); #ifndef POPEN_MISSING -@@ -324,6 +466,7 @@ +@@ -297,6 +439,7 @@ void file_iterator::close() #endif /* not POPEN_MISSING */ else fclose(fp); @@ -230,7 +230,7 @@ } int file_iterator::is_file() -@@ -331,7 +474,7 @@ +@@ -304,7 +447,7 @@ int file_iterator::is_file() return 1; } @@ -239,7 +239,7 @@ { close(); filename = s; -@@ -354,7 +497,7 @@ +@@ -327,7 +470,7 @@ int file_iterator::fill(node **) ptr = p; unsigned char *e = p + BUF_SIZE; while (p < e) { @@ -248,7 +248,7 @@ if (c == EOF) break; if (invalid_input_char(c)) -@@ -381,13 +524,13 @@ +@@ -354,13 +497,13 @@ int file_iterator::fill(node **) int file_iterator::peek() { @@ -265,7 +265,7 @@ return c; } -@@ -433,7 +576,7 @@ +@@ -406,7 +549,7 @@ public: static int set_location(const char *, int); static void backtrace(); static void backtrace_all(); @@ -274,7 +274,7 @@ static void end_file(); static void shift(int n); static void add_boundary(); -@@ -605,7 +748,7 @@ +@@ -583,7 +726,7 @@ int input_stack::set_location(const char return 0; } @@ -283,22 +283,22 @@ { input_iterator **pp; for (pp = ⊤ *pp != &nil_iterator; pp = &(*pp)->next) -@@ -691,10 +834,11 @@ +@@ -669,10 +812,11 @@ void next_file() input_stack::end_file(); else { errno = 0; -- FILE *fp = fopen(nm.contents(), "r"); +- FILE *fp = include_search_path.open_file_cautious(nm.contents()); - if (!fp) + opaque_fp *fp = new opaque_fp(nm.contents(), "r"); + if (!fp->active()) { -+ delete fp; ++ delete fp; error("can't open `%1': %2", nm.contents(), strerror(errno)); - else + } else input_stack::next_file(fp, nm.contents()); } tok.next(); -@@ -5372,11 +5516,12 @@ +@@ -5463,11 +5607,12 @@ void source() error("won't source non-file `%1' without -U flag", path); else { errno = 0; @@ -315,7 +315,7 @@ } tok.next(); } -@@ -6822,16 +6967,18 @@ +@@ -6856,16 +7001,18 @@ void macro_source() static void process_input_file(const char *name) { @@ -328,11 +328,11 @@ } else { errno = 0; -- fp = fopen(name, "r"); +- fp = include_search_path.open_file_cautious(name); - if (!fp) + fp = new opaque_fp(name, "r", OPQ_FP_GUESS); + if (!fp->active()) { -+ delete fp; ++ delete fp; fatal("can't open `%1': %2", name, strerror(errno)); + } } |