Package rebase (1.81.1 -> 1.20.1)

This commit is contained in:
jvcelak 2010-03-12 12:33:46 +00:00
parent 9b747a6652
commit a072af177b
28 changed files with 127 additions and 25656 deletions

View File

@ -1,3 +1 @@
man-pages-ja-GNU_groff-20000115.tar.gz groff-1.20.1.tar.gz
mandocj.tar.gz
groff-1.18.1.4.tar.gz

View File

@ -1,37 +0,0 @@
--- groff-1.16/src/roff/troff/input.cc.safer Wed Jun 7 21:47:48 2000
+++ groff-1.16/src/roff/troff/input.cc Wed Jun 7 21:50:37 2000
@@ -4404,12 +4406,28 @@
else {
while (!tok.newline() && !tok.eof())
tok.next();
- errno = 0;
- FILE *fp = fopen(nm.contents(), "r");
- if (fp)
- input_stack::push(new file_iterator(fp, nm.contents()));
- else
- error("can't open `%1': %2", nm.contents(), strerror(errno));
+ char cbuf[PATH_MAX], * cwd;
+ char pbuf[PATH_MAX], * path;
+ struct stat st;
+
+ if ((cwd = realpath(".", cbuf)) == NULL)
+ error("realpath on `%1' failed: %2", ".", strerror(errno));
+ else if ((path = realpath(nm.contents(), pbuf)) == NULL)
+ error("realpath on `%1' failed: %2", nm.contents(), strerror(errno));
+ else if (safer_flag && strncmp(cwd, path, strlen(cwd)))
+ error("won't source `%1' outside of `%2' without -U flag", path, cwd);
+ else if (stat(path, &st) < 0)
+ error("can't stat `%1': %2", path, strerror(errno));
+ else if (safer_flag && !S_ISREG(st.st_mode))
+ error("won't source non-file `%1' without -U flag", path);
+ else {
+ errno = 0;
+ FILE *fp = fopen(path, "r");
+ if (fp)
+ input_stack::push(new file_iterator(fp, nm.contents()));
+ else
+ error("can't open `%1': %2", path, strerror(errno));
+ }
tok.next();
}
}

View File

@ -1,340 +0,0 @@
--- 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
@@ -1,6 +1,6 @@
PROG=troff$(EXEEXT)
MAN1=troff.n
-XLIBS=$(LIBGROFF)
+XLIBS=-lz $(LIBGROFF)
MLIB=$(LIBM)
OBJS=\
env.$(OBJEXT) \
--- 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 @@
#include "nonposix.h"
+#include <zlib.h>
+
#ifdef NEED_DECLARATION_PUTENV
extern "C" {
int putenv(const char *);
@@ -217,6 +219,130 @@
skip_line();
}
+enum opq_fp_zmode { OPQ_FP_STDIO, OPQ_FP_ZLIB, OPQ_FP_GUESS };
+
+class opaque_fp {
+ private:
+ FILE * stdio_fp;
+ gzFile zlib_fp;
+ int is_zipped;
+ // We need this because zlib has no ungetc.
+ int char_pending;
+ char saved_char;
+ int popened;
+ public:
+ opaque_fp(const char *,
+ const char *,
+ enum opq_fp_zmode = OPQ_FP_STDIO);
+ opaque_fp(FILE *, int = 0);
+ ~opaque_fp();
+ int active();
+ int xgetc();
+ int unxgetc(int);
+};
+
+int opaque_fp::active()
+{
+ if (is_zipped) {
+ return zlib_fp!=NULL;
+ } else {
+ return stdio_fp!=NULL;
+ }
+}
+
+// This constructor is guaranteed to set is_zipped to 0 or 1, and set the
+// corresponding fp to something non-rubbish.
+opaque_fp::opaque_fp(const char * fn, const char * mode, enum opq_fp_zmode z)
+{
+ switch (z) {
+ case OPQ_FP_STDIO :
+ stdio_fp=fopen(fn,mode);
+ is_zipped=0;
+ break;
+
+ case OPQ_FP_ZLIB :
+ zlib_fp=gzopen(fn,mode);
+ is_zipped=1;
+ char_pending=0;
+ break;
+
+ case OPQ_FP_GUESS :
+ stdio_fp=fopen(fn,mode);
+ is_zipped=0;
+ if (active()) {
+ break;
+ }
+
+ // Yes, I'm a C addict
+ char * s;
+ s=(char*)malloc(strlen(fn)+4);
+ sprintf(s,"%s.gz",fn);
+ zlib_fp=gzopen(s,mode);
+ char_pending=0;
+ is_zipped=1;
+ free(s);
+ break;
+ }
+}
+
+opaque_fp::opaque_fp(FILE *fp, int p)
+{
+ stdio_fp=fp;
+ is_zipped=0;
+ popened=p;
+}
+
+opaque_fp::~opaque_fp()
+{
+ if (is_zipped) {
+ if (zlib_fp!=NULL) {
+ gzclose(zlib_fp);
+ zlib_fp=NULL;
+ }
+ } else {
+ if (stdio_fp!=NULL) {
+ if (popened) {
+ pclose(stdio_fp);
+ } else if (stdio_fp!=stdin) {
+ fclose(stdio_fp);
+ } else {
+ clearerr(stdin);
+ }
+ stdio_fp=NULL;
+ }
+ }
+}
+
+// These routines must be called only if active() is true
+int opaque_fp::xgetc()
+{
+ if (is_zipped) {
+ if (char_pending) {
+ char_pending--;
+ return saved_char;
+ } else {
+ return gzgetc(zlib_fp);
+ }
+ } else {
+ return getc(stdio_fp);
+ }
+}
+
+int opaque_fp::unxgetc(int c)
+{
+ if (is_zipped) {
+ if (char_pending) {
+ return EOF;
+ } else {
+ char_pending++;
+ saved_char=c;
+ return c;
+ }
+ } else {
+ return ungetc(c,stdio_fp);
+ }
+}
+
class input_iterator {
public:
input_iterator();
@@ -236,7 +362,7 @@
virtual int get_location(int, const char **, int *) { return 0; }
virtual void backtrace() {}
virtual int set_location(const char *, int) { return 0; }
- virtual int next_file(FILE *, const char *) { return 0; }
+ virtual int next_file(opaque_fp *, const char *) { return 0; }
virtual void shift(int) {}
virtual int is_boundary() {return 0; }
virtual int internal_level() { return 0; }
@@ -277,7 +403,7 @@
};
class file_iterator : public input_iterator {
- FILE *fp;
+ opaque_fp *fp;
int lineno;
const char *filename;
int popened;
@@ -286,7 +412,9 @@
enum { BUF_SIZE = 512 };
unsigned char buf[BUF_SIZE];
void close();
+ void ctor_end(void);
public:
+ file_iterator(opaque_fp *, const char *, int = 0);
file_iterator(FILE *, const char *, int = 0);
~file_iterator();
int fill(node **);
@@ -294,18 +422,30 @@
int get_location(int, const char **, int *);
void backtrace();
int set_location(const char *, int);
- int next_file(FILE *, const char *);
+ int next_file(opaque_fp *, const char *);
int is_file();
};
-file_iterator::file_iterator(FILE *f, const char *fn, int po)
+file_iterator::file_iterator(opaque_fp *f, const char *fn, int po)
: fp(f), lineno(1), filename(fn), popened(po),
newline_flag(0), seen_escape(0)
{
- if ((font::use_charnames_in_special) && (fn != 0)) {
+ ctor_end();
+}
+
+file_iterator::file_iterator(FILE * f, const char * fn, int po)
+: fp(new opaque_fp(f,po)), lineno(1), filename(fn), popened(po),
+ newline_flag(0), seen_escape(0)
+{
+ ctor_end();
+}
+
+void file_iterator::ctor_end(void)
+{
+ if ((font::use_charnames_in_special) && (filename != 0)) {
if (!the_output)
init_output();
- the_output->put_filename(fn);
+ the_output->put_filename(filename);
}
}
@@ -316,6 +456,8 @@
void file_iterator::close()
{
+ delete fp;
+#if 0
if (fp == stdin)
clearerr(stdin);
#ifndef POPEN_MISSING
@@ -324,6 +466,7 @@
#endif /* not POPEN_MISSING */
else
fclose(fp);
+#endif
}
int file_iterator::is_file()
@@ -331,7 +474,7 @@
return 1;
}
-int file_iterator::next_file(FILE *f, const char *s)
+int file_iterator::next_file(opaque_fp *f, const char *s)
{
close();
filename = s;
@@ -354,7 +497,7 @@
ptr = p;
unsigned char *e = p + BUF_SIZE;
while (p < e) {
- int c = getc(fp);
+ int c = fp->xgetc();
if (c == EOF)
break;
if (invalid_input_char(c))
@@ -381,13 +524,13 @@
int file_iterator::peek()
{
- int c = getc(fp);
+ int c = fp->xgetc();
while (invalid_input_char(c)) {
warning(WARN_INPUT, "invalid input character code %1", int(c));
- c = getc(fp);
+ c = fp->xgetc();
}
if (c != EOF)
- ungetc(c, fp);
+ fp->unxgetc(c);
return c;
}
@@ -433,7 +576,7 @@
static int set_location(const char *, int);
static void backtrace();
static void backtrace_all();
- static void next_file(FILE *, const char *);
+ static void next_file(opaque_fp *, const char *);
static void end_file();
static void shift(int n);
static void add_boundary();
@@ -605,7 +748,7 @@
return 0;
}
-void input_stack::next_file(FILE *fp, const char *s)
+void input_stack::next_file(opaque_fp *fp, const char *s)
{
input_iterator **pp;
for (pp = &top; *pp != &nil_iterator; pp = &(*pp)->next)
@@ -691,10 +834,11 @@
input_stack::end_file();
else {
errno = 0;
- FILE *fp = fopen(nm.contents(), "r");
- if (!fp)
+ opaque_fp *fp = new opaque_fp(nm.contents(), "r");
+ if (!fp->active()) {
+ 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 @@
error("won't source non-file `%1' without -U flag", path);
else {
errno = 0;
- FILE *fp = fopen(path, "r");
- if (fp)
+ opaque_fp *fp = new opaque_fp(nm.contents(), "r",OPQ_FP_GUESS);
+ if (fp->active()) {
input_stack::push(new file_iterator(fp, nm.contents()));
- else
- error("can't open `%1': %2", path, strerror(errno));
+ } else {
+ delete fp;
+ }
}
tok.next();
}
@@ -6822,16 +6967,18 @@
static void process_input_file(const char *name)
{
- FILE *fp;
+ opaque_fp *fp;
if (strcmp(name, "-") == 0) {
clearerr(stdin);
- fp = stdin;
+ fp = new opaque_fp(stdin);
}
else {
errno = 0;
- fp = fopen(name, "r");
- if (!fp)
+ fp = new opaque_fp(name, "r", OPQ_FP_GUESS);
+ if (!fp->active()) {
+ delete fp;
fatal("can't open `%1': %2", name, strerror(errno));
+ }
}
input_stack::push(new file_iterator(fp, name));
tok.next();

View File

@ -1,11 +0,0 @@
--- groff-1.18/doc/groff.texinfo.info 2002-07-05 17:07:24.000000000 +0200
+++ groff-1.18/doc/groff.texinfo 2002-08-01 15:23:23.000000000 +0200
@@ -8,7 +8,7 @@
@c
@c %**start of header (This is for running Texinfo on a region.)
-@setfilename groff
+@setfilename groff.info
@settitle The GNU Troff Manual
@setchapternewpage odd
@footnotestyle separate

View File

@ -1,14 +0,0 @@
--- groff-1.18/Makefile.in.sopwith 2002-10-04 17:10:56.000000000 -0400
+++ groff-1.18/Makefile.in 2002-10-04 17:11:09.000000000 -0400
@@ -422,8 +422,9 @@
src/utils/lookbib \
src/utils/indxbib \
src/utils/lkbib \
- src/utils/addftinfo
-CPROGDIRS=src/utils/pfbtops
+ src/utils/addftinfo \
+ src/utils/pfbtops
+CPROGDIRS=
PROGDIRS=$(CCPROGDIRS) $(CPROGDIRS)
DEVDIRS=\
font/devps \

View File

@ -1,17 +0,0 @@
2002-10-11 Ruslan Ermilov <ru@FreeBSD.org>
* src/roff/troff/env.cc (hyphen_trie::read_patterns_file): Add
cast to `unsigned char' to properly read patterns with 8bit
characters.
--- groff-1.18.1/src/roff/troff/env.cc
+++ groff-1.18.1/src/roff/troff/env.cc
@@ -3924,7 +3924,7 @@
if (i > 0) {
if (have_patterns || final_pattern || traditional) {
for (int j = 0; j < i; j++)
- buf[j] = hpf_code_table[buf[j]];
+ buf[j] = hpf_code_table[(unsigned char)buf[j]];
insert_pattern(buf, i, num);
final_pattern = 0;
}

View File

@ -1,42 +0,0 @@
--- groff-1.18.1/font/devutf8/M.proto.devutf8 2004-03-08 16:25:52.000000000 +0100
+++ groff-1.18.1/font/devutf8/M.proto 2004-03-08 17:02:40.265336984 +0100
@@ -1,6 +1,6 @@
name M
internalname 4
-spacewidth 48
+spacewidth 24
charset
-u2E00..u9FFF 48 0
-uFF00..uFFEF 48 0
+u0100..u07FF 24 0
+u0800..uFFFF 48 0
--- groff-1.18.1/font/devutf8/DESC.proto.devutf8 2004-03-08 16:25:52.000000000 +0100
+++ groff-1.18.1/font/devutf8/DESC.proto 2004-03-08 16:25:53.000000000 +0100
@@ -3,10 +3,7 @@
vert 40
unitwidth 10
sizes 10 0
-fonts 6 R I B BI M G
-fontset B G 2E00..9FFF
-fontset B G FF00..FFEF
-fontset - M 2E00..9FFF
-fontset - M FF00..FFEF
+fonts 5 R I B BI M
+fontset - M 0100..FFFF
tcommand
postpro grotty
--- groff-1.18.1/font/devutf8/Makefile.sub.devutf8 2004-03-08 16:25:52.000000000 +0100
+++ groff-1.18.1/font/devutf8/Makefile.sub 2004-03-08 17:03:58.858389024 +0100
@@ -25,11 +25,7 @@
M: M.proto
@echo Making M
@-rm -f M
- (wcharwidth=`expr $(RES) / $(CPI) \* 2` ; \
- spacewidth=`expr $(RES) / $(CPI)` ; \
- sed -e "s/^spacewidth [0-9][0-9]*$$/spacewidth $$spacewidth/" \
- -e "s/^u\\([0-9A-F]*\\)..u\\([0-9A-F]*\\) [0-9][0-9]*/u\\1..u\\2 $$wcharwidth/" \
- $(srcdir)/M.proto > $@)
+ @cp M.proto M
G: M
@echo Making G

View File

@ -1,27 +0,0 @@
--- groff-1.18.1/src/libs/libgroff/encoding.cc.fix15 2004-03-08 16:13:15.825000416 +0100
+++ groff-1.18.1/src/libs/libgroff/encoding.cc 2004-03-08 16:14:41.451983136 +0100
@@ -384,21 +384,10 @@
}
/* otherwise */
#if HAVE_LANGINFO_CODESET
- charset = nl_langinfo(CODESET);
-#else
- charset = strchr(locale, '.');
- if (charset)
- ++charset;
- else
- charset = "";
+ locale = nl_langinfo(CODESET);
#endif
- if (strncmp(locale, "ja", 2) == 0) {
- select_input_encoding_handler(charset);
- select_output_encoding_handler(charset);
- } else if ((!device || strcmp(device, "ascii8") == 0)) {
- select_input_encoding_handler(NULL);
- select_output_encoding_handler(NULL);
- }
+ select_input_encoding_handler(locale);
+ select_output_encoding_handler(locale);
#endif
return;
}

View File

@ -1,11 +0,0 @@
--- groff-1.18.1/font/devutf8/R.proto.fixminus 2003-02-03 14:19:47.000000000 +0100
+++ groff-1.18.1/font/devutf8/R.proto 2003-02-03 14:20:06.000000000 +0100
@@ -285,7 +285,7 @@
+h 24 0 0x03D1
+f 24 0 0x03D5
+p 24 0 0x03D6
-- 24 0 0x2010
+- 24 0 0x002D
hy "
en 24 0 0x2013
em 24 0 0x2014

View File

@ -1,22 +0,0 @@
--- groff-1.18.1/src/roff/troff/input.cc.gzext 2003-02-10 18:32:00.000000000 +0100
+++ groff-1.18.1/src/roff/troff/input.cc 2003-02-10 18:33:18.000000000 +0100
@@ -5487,12 +5487,16 @@
char cbuf[PATH_MAX], * cwd;
char pbuf[PATH_MAX], * path;
struct stat st;
+ char tmp[PATH_MAX];
+ snprintf(tmp, PATH_MAX, "%s.gz", nm.contents());
if ((cwd = realpath(".", cbuf)) == NULL)
error("realpath on `%1' failed: %2", ".", strerror(errno));
- else if ((path = realpath(nm.contents(), pbuf)) == NULL)
- error("realpath on `%1' failed: %2", nm.contents(), strerror(errno));
- else if (safer_flag && strncmp(cwd, path, strlen(cwd)))
+ else if ((path = realpath(nm.contents(), pbuf)) == NULL &&
+ (path = realpath(tmp, pbuf)) == NULL)
+ {
+ error("realpath on `%1' failed: %2", nm.contents(), strerror(errno));
+ } else if (safer_flag && strncmp(cwd, path, strlen(cwd)))
error("won't source `%1' outside of `%2' without -U flag", path, cwd);
else if (stat(path, &st) < 0)
error("can't stat `%1': %2", path, strerror(errno));

View File

@ -1,38 +0,0 @@
--- groff-1.18.1/src/roff/nroff/nroff.sh.orig 2003-02-06 19:37:17.000000000 +0900
+++ groff-1.18.1/src/roff/nroff/nroff.sh 2003-02-06 19:38:34.000000000 +0900
@@ -14,6 +14,8 @@
T=-Tcp1047 ;;
EUC-JP)
T=-Tnippon ;;
+ EUC-KR)
+ T=-Tkorean ;;
*)
case "${LC_ALL-${LC_CTYPE-${LANG}}}" in
*.UTF-8)
@@ -24,6 +26,8 @@
T=-Tcp1047 ;;
ja_JP.ujis | ja_JP.eucJP)
T=-Tnippon ;;
+ ko_KR.eucKR)
+ T=-Tkorean ;;
*)
case "$LESSCHARSET" in
utf-8)
@@ -34,6 +38,8 @@
T=-Tcp1047 ;;
japanese)
T=-Tnippon ;;
+ ko)
+ T=-Tkorean ;;
*)
T=-Tascii8 ;;
esac ;;
@@ -58,7 +64,7 @@
exit 1 ;;
-[iptSUC] | -[mrno]*)
opts="$opts $1" ;;
- -Tascii | -Tlatin1 | -Tutf8 | -Tcp1047 | -Tascii8 | -Tnippon)
+ -Tascii | -Tlatin1 | -Tutf8 | -Tcp1047 | -Tascii8 | -Tnippon | -Tkorean)
T=$1 ;;
-T*)
# ignore other devices

View File

@ -1,11 +0,0 @@
--- groff-1.18.1.1/src/libs/libdriver/input.cc.orig 2006-01-10 11:11:36.000000000 +0100
+++ groff-1.18.1.1/src/libs/libdriver/input.cc 2006-01-10 11:11:52.000000000 +0100
@@ -1786,7 +1786,7 @@
if (npages <= 0)
fatal_command(command);
char *str_arg = get_string_arg();
- size_t i = 0;
+ int i = 0;
while ((c = str_arg[i++]) != '\0') {
EnvInt w;
#ifdef ENABLE_MULTIBYTE

View File

@ -1,27 +0,0 @@
--- groff-1.18.1.1/src/xditview/draw.c.do_char 2004-09-15 17:42:34.221596494 +0200
+++ groff-1.18.1.1/src/xditview/draw.c 2004-09-15 17:42:35.880369335 +0200
@@ -418,7 +418,11 @@
dw->dvi.state->font_size, c, &wid))
return;
if (dw->dvi.native) {
+#ifdef ENABLE_MULTIBYTE
+ DoCharacter (dw, c, wid, map->char2XChar2b);
+#else
DoCharacter (dw, c, wid);
+#endif
return;
}
map = QueryFontMap (dw, dw->dvi.state->font_number);
@@ -429,7 +433,11 @@
name = device_name_for_code ((DeviceFont *)0, c)) {
int code = DviCharIndex (map, name);
if (code >= 0) {
- DoCharacter (dw, code, wid);
+#ifdef ENABLE_MULTIBYTE
+ DoCharacter (dw, code, wid, map->char2XChar2b);
+#else
+ DoCharacter (dw, code, wid);
+#endif
break;
}
if (FakeCharacter (dw, name, wid))

View File

@ -1,11 +0,0 @@
--- groff-1.18.1.1/src/devices/grohtml/post-html.cc.gcc41 2006-01-05 16:01:16.000000000 +0100
+++ groff-1.18.1.1/src/devices/grohtml/post-html.cc 2006-01-05 16:02:14.000000000 +0100
@@ -261,7 +261,7 @@ struct char_block {
char_block *next;
char_block();
- char_block::char_block(int length);
+ char_block(int length);
};
char_block::char_block()

View File

@ -1,10 +0,0 @@
--- groff-1.18.1.1/src/preproc/grn/hdb.cc.grn 2002-10-07 06:42:55.000000000 +0200
+++ groff-1.18.1.1/src/preproc/grn/hdb.cc 2004-09-16 10:23:42.394486378 +0200
@@ -115,7 +115,6 @@
type = DBGetType(string); /* interpret element type */
if (type < 0) { /* no more data */
done = TRUE;
- (void) fclose(file);
} else {
#ifdef UW_FASTSCAN
(void) xscanf(file, &x, &y); /* always one point */

View File

@ -1,5 +0,0 @@
--- groff-1.18.1.1/REVISION.revision 2004-06-29 12:59:31.775599717 +0200
+++ groff-1.18.1.1/REVISION 2004-06-29 12:58:34.646490040 +0200
@@ -1 +1 @@
-1
+1.1

View File

@ -1,41 +0,0 @@
--- groff-1.18.1.1/contrib/pic2graph/pic2graph.sh.sectmp 2006-02-16 16:27:38.000000000 +0100
+++ groff-1.18.1.1/contrib/pic2graph/pic2graph.sh 2006-02-16 16:22:43.000000000 +0100
@@ -73,11 +73,12 @@
# 2. Process through eqn and pic to emit troff markup.
# 3. Process through groff to emit Postscript.
# 4. Use convert(1) to crop the PostScript and turn it into a bitmap.
-tmp=/tmp/pic2graph-$$
-trap "rm ${tmp}.*" 0 2 15
+tmpps=`mktemp /tmp/pic2graph-XXXXXXXX.ps`
+tmpfmt=`mktemp /tmp/pic2graph-XXXXXXXX.$format`
+trap "rm $tmpps $tmpfmt" 0 2 15
(echo ".EQ"; echo $eqndelim; echo ".EN"; echo ".PS"; cat; echo ".PE") | \
- groff -e -p $groffpic_opts -Tps >${tmp}.ps \
- && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \
- && cat ${tmp}.${format}
+ groff -e -p $groffpic_opts -Tps >$tmpps \
+ && convert -crop 0x0 $convert_opts $tmpps $tmpfmt \
+ && cat $tmpfmt
# End
--- groff-1.18.1.1/contrib/eqn2graph/eqn2graph.sh.sectmp 2006-02-16 16:27:38.000000000 +0100
+++ groff-1.18.1.1/contrib/eqn2graph/eqn2graph.sh 2006-02-16 16:06:27.000000000 +0100
@@ -63,12 +63,13 @@
# 2. Process through eqn(1) to emit troff markup.
# 3. Process through groff(1) to emit Postscript.
# 4. Use convert(1) to crop the Postscript and turn it into a bitmap.
-tmp=/tmp/eqn2graph-$$
-trap "rm ${tmp}.*" 0 2 15
+tmpps=`mktemp /tmp/eqn2graph-XXXXXXXX.ps`
+tmpfmt=`mktemp /tmp/eqn2graph-XXXXXXXX.$format`
+trap "rm $tmpps $tmpfmt" 0 2 15
read equation
(echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"${equation}"'$') | \
- groff -e $groff_opts -Tps >${tmp}.ps \
- && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \
- && cat ${tmp}.${format}
+ groff -e $groff_opts -Tps >$tmpps \
+ && convert -crop 0x0 $convert_opts $tmpps $tmpfmt \
+ && cat $tmpfmt
# End

View File

@ -1,11 +0,0 @@
--- ./src/roff/troff/env.cc.orig 2006-01-12 14:43:05.000000000 +0100
+++ ./src/roff/troff/env.cc 2006-01-12 14:45:55.000000000 +0100
@@ -300,7 +300,7 @@
* This code is based on jgroff
* about kerning between ASCII and EUC-JP
*/
- if (!ci->get_wchar_code()) {
+ if (!ci->get_wchar_code() || wchar_code(ci->get_wchar_code()) < 0x590) {
/*
* This node is a ASCII character node.
*/

View File

@ -1,28 +0,0 @@
--- groff-1.18.1.1/contrib/groffer/groffer.sh.tempfile 2004-06-15 03:44:50.000000000 +0200
+++ groff-1.18.1.1/contrib/groffer/groffer.sh 2004-10-19 13:04:35.704244526 +0200
@@ -3228,18 +3228,13 @@
do
if is_not_empty "$d"; then
if obj d is_dir && obj d is_writable; then
- _TMP_DIR="${d}/${_PROGRAM_NAME}${_PROCESS_ID}";
- if obj _TMP_DIR is_dir; then
- rm -f "${_TMP_DIR}"/*;
- break;
- else
- mkdir "${_TMP_DIR}";
- if obj _TMP_DIR is_not_dir; then
- _TMP_DIR='';
- continue;
- fi;
- break;
- fi;
+ _TMP_DIR="`mktemp -d ${d}/${_PROGRAM_NAME}.XXXXXX`";
+ if test $? = 0; then
+ break;
+ else
+ _TMP_DIR='';
+ continue;
+ fi
fi;
if obj _TMP_DIR is_not_writable; then
_TMP_DIR='';

View File

@ -1,14 +0,0 @@
diff -up groff-1.18.1.4/src/devices/grolbp/lbp.cc.old groff-1.18.1.4/src/devices/grolbp/lbp.cc
--- groff-1.18.1.4/src/devices/grolbp/lbp.cc.old 2008-01-03 15:38:25.000000000 +0100
+++ groff-1.18.1.4/src/devices/grolbp/lbp.cc 2008-01-03 15:38:33.000000000 +0100
@@ -25,7 +25,9 @@ TODO
- Add X command to include bitmaps
*/
-#define _GNU_SOURCE
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
#include "driver.h"
#include "lbp.h"

View File

@ -1,22 +0,0 @@
diff -up groff-1.18.1.4/contrib/groffer/groffer.sh.old groff-1.18.1.4/contrib/groffer/groffer.sh
--- groff-1.18.1.4/contrib/groffer/groffer.sh.old 2006-10-04 22:35:39.000000000 +0200
+++ groff-1.18.1.4/contrib/groffer/groffer.sh 2007-10-08 09:01:29.000000000 +0200
@@ -129,7 +129,7 @@ no)
esac;
export _GROFFER2_SH; # file name of the script that follows up
-_GROFFER2_SH="${_GROFFER_LIBDIR}"'groffer2.sh';
+_GROFFER2_SH="${_GROFFER_LIBDIR}${_GROFF_VERSION}"'groffer2.sh';
export _GROFFER_SH; # file name of this shell script
case "$0" in
@@ -331,7 +331,8 @@ fi;
if test _"${_SHELL}"_ = __
then
# no shell found, so start groffer2.sh normally
- eval . "'${_GROFFER2_SH}'" '"$@"';
+ #eval . "'${_GROFFER2_SH}'" '"$@"';
+ eval . "/usr/share/groff/${_GROFF_VERSION}/groffer/groffer2.sh" '"$@"';
exit;
else
# start groffer2.sh with the found $_SHELL

View File

@ -1,43 +0,0 @@
--- groff-1.18.1.4/contrib/eqn2graph/eqn2graph.sh.sectmp 2006-10-23 14:12:41.000000000 +0200
+++ groff-1.18.1.4/contrib/eqn2graph/eqn2graph.sh 2006-10-23 14:20:20.000000000 +0200
@@ -63,12 +63,14 @@
# 2. Process through eqn(1) to emit troff markup.
# 3. Process through groff(1) to emit Postscript.
# 4. Use convert(1) to crop the Postscript and turn it into a bitmap.
-tmp=/tmp/eqn2graph-$$
-trap "rm ${tmp}.*" 0 2 15
+
+tmpps=`mktemp /tmp/eqn2graph-XXXXXXXX.ps`
+tmpfmt=`mktemp /tmp/eqn2graph-XXXXXXXX.$format`
+trap "rm $tmpps $tmpfmt" 0 2 15
read equation
(echo ".EQ"; echo 'delim $$'; echo ".EN"; echo '$'"${equation}"'$') | \
- groff -e $groff_opts -Tps >${tmp}.ps \
- && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \
- && cat ${tmp}.${format}
+ groff -e $groff_opts -Tps >$tmpps \
+ && convert -crop 0x0 $convert_opts $tmpps $tmpfmt \
+ && cat $tmpfmt
# End
--- groff-1.18.1.4/contrib/pic2graph/pic2graph.sh.sectmp 2006-10-23 14:12:41.000000000 +0200
+++ groff-1.18.1.4/contrib/pic2graph/pic2graph.sh 2006-10-23 14:18:57.000000000 +0200
@@ -73,11 +73,13 @@
# 2. Process through eqn and pic to emit troff markup.
# 3. Process through groff to emit Postscript.
# 4. Use convert(1) to crop the PostScript and turn it into a bitmap.
-tmp=/tmp/pic2graph-$$
-trap "rm ${tmp}.*" 0 2 15
+
+tmpps=`mktemp /tmp/pic2graph-XXXXXXXX.ps`
+tmpfmt=`mktemp /tmp/pic2graph-XXXXXXXX.$format`
+trap "rm $tmpps $tmpfmt" 0 2 15
(echo ".EQ"; echo $eqndelim; echo ".EN"; echo ".PS"; cat; echo ".PE") | \
- groff -e -p $groffpic_opts -Tps >${tmp}.ps \
- && convert -crop 0x0 $convert_opts ${tmp}.ps ${tmp}.${format} \
- && cat ${tmp}.${format}
+ groff -e -p $groffpic_opts -Tps >$tmpps \
+ && convert -crop 0x0 $convert_opts $tmpps $tmpfmt \
+ && cat $tmpfmt
# End

View File

@ -1,19 +0,0 @@
--- groff-1.18.1/Makefile.ccpg.sopwith Mon Feb 10 08:33:21 2003
+++ groff-1.18.1/Makefile.ccpg Mon Feb 10 08:54:00 2003
@@ -8,7 +8,7 @@
all: $(PROG) $(MANPAGES)
-$(PROG): $(OBJS) $(XLIBS)
+$(PROG): $(OBJS)
$(LINK.cc) -o $@ $(OBJS) $(XLIBS) $(LIBS) $(MLIB)
install_bin: install_prog
@@ -28,6 +28,6 @@
pure: $(PROG).pure
-$(PROG).pure: $(OBJS) $(XLIBS)
+$(PROG).pure: $(OBJS)
$(PURIFY) $(PURIFYCCFLAGS) \
$(LINK.cc) -o $@ $(OBJS) $(XLIBS) $(LIBS) $(MLIB)

View File

@ -1,46 +1,23 @@
%{!?with_x:%define with_x 1} %{!?with_x:%define with_x 1}
Summary: A document formatting system Summary: A document formatting system
Name: groff Name: groff
Version: 1.18.1.4 Version: 1.20.1
Release: 18%{?dist} Release: 0%{?dist}
License: GPLv2 and GFDL License: GPLv3+ and GFDL and BSD and MIT
Group: Applications/Publishing Group: Applications/Publishing
URL: http://groff.ffii.org URL: http://groff.ffii.org
Source0: ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.gz Source0: ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.gz
Source3: mandocj.tar.gz
Source4: man-pages-ja-GNU_groff-20000115.tar.gz
Source6: hyphen.cs
Source7: nroff
Patch1: groff-1.16-safer.patch
Patch3: groff_1.18.1-15.diff
Patch4: groff-1.18-info.patch
Patch6: groff-1.18-pfbtops_cpp.patch
Patch7: groff-1.18-gzip.patch
Patch9: groff-1.18.1-fixminus.patch
Patch11: groff-1.18.1-8bit.patch
Patch12: groff-1.18.1-korean.patch
Patch13: groff-1.18.1-gzext.patch
#Patch14: groff-xlibs.patch
Patch15: groff-1.18.1-fix15.patch
Patch16: groff-1.18.1-devutf8.patch
#Patch17: groff-1.18.1.3-revision.patch
Patch18: groff-1.18.1.1-do_char.patch
#Patch19: groff-1.18.1.1-grn.patch
#Patch20: groff-1.18.1.1-tempfile.patch
#Patch21: groff-1.18.1.1-gcc41.patch
#Patch22: groff-1.18.1.1-bigendian.patch
Patch23: groff-1.18.1.1-spacefix.patch
Patch24: groff-1.18.1.4-sectmp.patch
Patch25: groff-1.18.1.4-grofferpath.patch
Patch26: groff-1.18.1.4-gcc4.3.0.patch
Requires: mktemp Requires: mktemp
Requires: /sbin/install-info Requires: /sbin/install-info
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Conflicts: groff-tools = %version Provides: nroff-i18n = %{version}-%{release}
Provides: nroff-i18n = %version BuildRequires: netpbm-progs psutils ghostscript
BuildRequires: byacc zlib-devel texinfo # when building from CVS add: BuildRequires: texinfo byacc
Requires(post): info
Requires(preun): info
%description %description
Groff is a document formatting system. Groff takes standard text and Groff is a document formatting system. Groff takes standard text and
@ -52,178 +29,166 @@ more.
Groff can also be used to format man pages. If you are going to use Groff can also be used to format man pages. If you are going to use
groff with the X Window System, you will also need to install the groff with the X Window System, you will also need to install the
groff-gxditview package. groff-x11 package.
%package perl %package perl
Summary: Parts of the groff formatting system that require Perl Summary: Parts of the groff formatting system that require Perl
Group: Applications/Publishing Group: Applications/Publishing
Requires: groff = %{version}-%{release}
%description perl %description perl
The groff-perl package contains the parts of the groff text processor The groff-perl package contains the parts of the groff text processor
package that require Perl. These include the afmtodit font processor package that require Perl. These include the afmtodit (font processor
for creating PostScript font files, the grog utility that can be used for creating PostScript font files), groffer (tool for displaying groff
to automatically determine groff command-line options, and the files), grog (utility that can be used to automatically determine groff
troff-to-ps print filter. command-line options), chem (groff preprocessor for producing chemical
structure diagrams), mmroff (reference preprocessor) and roff2dvi
roff2html roff2pdf roff2ps roff2text roff2x (roff code converters).
%if %{with_x} %if %{with_x}
%package gxditview %package x11
Summary: An X previewer for groff text processor output Summary: Parts of the groff formatting system that require X Windows System
Group: Applications/Publishing Group: Applications/Publishing
BuildRequires: imake xorg-x11-proto-devel libX11-devel libXaw-devel BuildRequires: libXaw-devel libXmu-devel
BuildRequires: libXt-devel libXpm-devel libXext-devel Requires: groff = %{version}-%{release}
Provides: groff-gxditview = %{version}-%{release}
Obsoletes: groff-gxditview < 1.20.1
%description gxditview %description x11
Gxditview displays the groff text processor's output on an X Window The groff-x11 package contains the parts of the groff text processor
System display. package that require X Windows System. These include gxditview (display
groff intermediate output files on X Window System display) and
xtotroff (converts X font metrics into groff font metrics).
%endif %endif
%prep %package doc
%setup -q -a 4 Summary: Documentation for groff document formatting system
%patch1 -p1 Group: Documentation
%patch3 -p1 Requires: groff = %{version}-%{release}
%patch4 -p1
#%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch9 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1 -b .gzext
#%patch14 -p1
%patch15 -p1 -b .fix9
%patch16 -p1 -b .devutf8
#%patch17 -p1 -b .revision
%patch18 -p1 -b .do_char
#%patch19 -p1 -b .grn
#%patch20 -p1 -b .tempfile
#%patch21 -p1 -b .gcc41
#%patch22 -p1 -b .bigendian
%patch23 -p1 -b .spacefix
%patch24 -p1 -b .sectmp
%patch25 -p1 -b .grofferpath
%patch26 -p1 -b .gcc43
for i in contrib/mm/{groff_mm,groff_mmse,mmroff}.man \ %description doc
src/devices/grolbp/grolbp.man; do The groff-doc package includes additional documentation for groff
iconv -f iso-8859-1 -t utf-8 < "$i" > "${i}_" text processor package. It contains examples, documentation for PIC
mv "${i}_" "$i" language and documentation for creating PDF files.
%prep
%setup -q
for file in NEWS src/devices/grolbp/grolbp.man doc/{groff.info*,webpage.ms} \
contrib/mm/*.man contrib/mom/examples/{README.txt,*.mom} ; do
iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_"
mv "${file}_" "$file"
done done
%build %build
#PATH=$PATH:%{_prefix}/X11R6/bin %configure --with-appresdir=%{_datadir}/X11/app-defaults
#autoconf make
%configure --enable-multibyte
# no html docs
make make_html=
(cd doc && makeinfo groff.texinfo)
%if %{with_x}
cd src/xditview
xmkmf && make %{?_smp_mflags}
%endif
%install %install
rm -rf ${RPM_BUILD_ROOT} rm -rf %{buildroot}
#PATH=$PATH:%{_prefix}/X11R6/bin
mkdir -p ${RPM_BUILD_ROOT}%{_infodir}
# 1) no html docs
# 2) the list could be shorter if configure parameters were not expanded;
# %%configure should be fixed!
make install make_html= make_install_html= \
manroot=${RPM_BUILD_ROOT}%{_mandir} \
bindir=%{buildroot}%{_bindir} \
mandir=%{buildroot}%{_mandir} \
prefix=%{buildroot}/usr \
exec_prefix=%{buildroot}/usr \
sbindir=%{buildroot}%{_exec_prefix}/sbin \
sysconfdir=%{buildroot}/etc \
datadir=%{buildroot}/usr/share \
infodir=%{buildroot}/%{_prefix}/info \
sysconfdir=%{buildroot}/etc \
includedir=%{buildroot}/usr/include \
libdir=%{buildroot}/%{_libdir} \
libexecdir=%{buildroot}/usr/libexec \
localstatedir=%{buildroot}/var \
sharedstatedir=%{buildroot}/usr/com \
infodir=%{buildroot}/usr/share/info
#install -m 644 doc/groff.info* ${RPM_BUILD_ROOT}/%{_infodir}
%if %{with_x}
cd src/xditview
make install DESTDIR=${RPM_BUILD_ROOT}
cd ../..
%endif
for file in {s,mse,m}.tmac; do make install DESTDIR=%{buildroot} \
ln -s $file ${RPM_BUILD_ROOT}%{_datadir}/groff/%{version}/tmac/g$file docdir=%{_docdir}/%{name}-%{version} \
done groffer_dir=%{_datadir}/%{name}/%{version}/groffer
for file in g{{n,t}roff,tbl,pic,{,n}eqn,refer,{look,indx}bib} {g,z}soelim; do
ln -s ${file#?} ${RPM_BUILD_ROOT}%{_bindir}/$file # some binaries need alias with 'g' or 'z' prefix
ln -s {${file#?},${RPM_BUILD_ROOT}%{_mandir}/man1/$file}.1.gz
for file in g{nroff,troff,tbl,pic,eqn,neqn,refer,lookbib,indxbib,soelim} zsoelim; do
ln -s ${file#?} %{buildroot}%{_bindir}/${file}
ln -s ${file#?}.1.gz %{buildroot}%{_mandir}/man1/${file}.1.gz
done done
ln -s devnippon ${RPM_BUILD_ROOT}%{_datadir}/groff/%{version}/font/devkorean # perl dependent files in /usr/bin will be in separate package
cat debian/mandoc.local >> ${RPM_BUILD_ROOT}%{_datadir}/groff/site-tmac/mdoc.local rm -f files-perl files-nonperl
cat debian/mandoc.local >> ${RPM_BUILD_ROOT}%{_datadir}/groff/site-tmac/man.local for file in %{buildroot}%{_bindir}/*; do
# package selection
if grep -q -m1 '^#!.*\<perl\>' $file; then
output_file=files-perl
else
output_file=files-nonperl
fi
find ${RPM_BUILD_ROOT}%{_bindir} ${RPM_BUILD_ROOT}%{_mandir} -type f -o -type l | \ echo %{_bindir}/$(basename $file) >> $output_file
sed "/afmtodit/d;/grog/d;/mdoc\.samples/d;/mmroff/d;/gxditview/d
s|${RPM_BUILD_ROOT}||g; s|\.[0-9]|\.*|g" > groff-files
install -pm 644 %SOURCE6 $RPM_BUILD_ROOT%{_datadir}/groff/%version/tmac/hyphen.cs # manpage availability
manfile=%{buildroot}%{_mandir}/man1/$(basename $file).\*
if [ -f $manfile -o -L $manfile ]; then
echo %{_mandir}/man1/$(basename $file).\* >> $output_file
fi
done
install -pm 755 %SOURCE7 $RPM_BUILD_ROOT%{_bindir}/nroff # another documentation files
ln -sf doc.tmac $RPM_BUILD_ROOT%{_datadir}/groff/%version/tmac/docj.tmac cp BUG-REPORT COPYING FDL LICENSES MORE.STUFF NEWS PROBLEMS %{buildroot}%{_docdir}/%{name}-%{version}
# installed, but not packaged in rpm
mkdir -p $RPM_BUILD_ROOT%{_datadir}/groff/%{version}/groffer/ # remove unnecessary files and fix privileges
chmod 755 $RPM_BUILD_ROOT%{_datadir}/groff/1.18.1.4/font/devps/generate/symbol.sed
chmod 755 $RPM_BUILD_ROOT%{_datadir}/groff/1.18.1.4/font/devdvi/generate/CompileFonts rm -f %{buildroot}%{_infodir}/dir
chmod 755 $RPM_BUILD_ROOT%{_datadir}/groff/1.18.1.4/font/devps/generate/afmname
chmod 755 $RPM_BUILD_ROOT%{_libdir}/groff/groffer/version.sh chmod 755 %{buildroot}%{_datadir}/groff/%{version}/groffer/version.sh
mv $RPM_BUILD_ROOT%{_libdir}/groff/groffer/* $RPM_BUILD_ROOT/%{_datadir}/groff/%{version}/groffer/ chmod 755 %{buildroot}%{_datadir}/groff/%{version}/font/devlj4/generate/special.awk
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/groff $RPM_BUILD_ROOT%{_infodir}/dir $RPM_BUILD_ROOT/%{_prefix}/lib/X11/app-defaults
rm -rf $RPM_BUILD_ROOT%{_libdir}/groff/groffer
rm -rf $RPM_BUILD_ROOT%{_libdir}/groff/site-tmac
rm -rf $RPM_BUILD_ROOT%{_libdir}/groff
%clean %clean
rm -rf ${RPM_BUILD_ROOT} rm -rf %{buildroot}
%post %post
/sbin/install-info %{_infodir}/groff.gz %{_infodir}/dir; /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
exit 0
%preun %preun
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
/sbin/install-info --delete %{_infodir}/groff.gz %{_infodir}/dir /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
fi fi
exit 0
%files -f groff-files %files -f files-nonperl
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc BUG-REPORT NEWS PROBLEMS README TODO VERSION %doc %{_docdir}/%{name}-%{version}/*.me
%doc doc/meintro.me doc/meref.me doc/pic.ms %doc %{_docdir}/%{name}-%{version}/*.ps
%{_datadir}/groff %doc %{_docdir}/%{name}-%{version}/*.ms
%{_infodir}/groff* %doc %{_docdir}/%{name}-%{version}/BUG-REPORT
%doc %{_docdir}/%{name}-%{version}/COPYING
%doc %{_docdir}/%{name}-%{version}/FDL
%doc %{_docdir}/%{name}-%{version}/LICENSES
%doc %{_docdir}/%{name}-%{version}/MORE.STUFF
%doc %{_docdir}/%{name}-%{version}/NEWS
%doc %{_docdir}/%{name}-%{version}/PROBLEMS
%{_datadir}/groff/
# manpages for binaries are covered by -f
%{_mandir}/man1/grohtml.*
%{_mandir}/man5/*
%{_mandir}/man7/*
%{_infodir}/groff.info*
%exclude %{_datadir}/groff/%{version}/groffer
%exclude %{_bindir}/gxditview
%exclude %{_bindir}/xtotroff
%exclude %{_mandir}/man1/gxditview.*
%exclude %{_mandir}/man1/xtotroff.*
%files perl %files perl -f files-perl
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_bindir}/grog %{_datadir}/groff/%{version}/groffer/
%{_bindir}/mmroff
%{_bindir}/afmtodit
%{_mandir}/man1/afmtodit.*
%{_mandir}/man1/grog.*
%{_mandir}/man1/mmroff*
%if %{with_x} %if %{with_x}
%files gxditview %files x11
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_bindir}/gxditview %{_bindir}/gxditview
%{_bindir}/xtotroff
%{_datadir}/X11/app-defaults/GXditview %{_datadir}/X11/app-defaults/GXditview
%{_datadir}/X11/app-defaults/GXditview-color
%{_mandir}/man1/gxditview.*
%{_mandir}/man1/xtotroff.*
%endif %endif
%files doc
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-%{version}/examples/
%doc %{_docdir}/%{name}-%{version}/html/
%doc %{_docdir}/%{name}-%{version}/pdf/
%changelog %changelog
* Tue Mar 12 2010 Jan Vcelak <jvcelak@redhat.com> - 1.20.1-0
- Package rebase to upstream 1.20.1
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.18.1.4-18 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.18.1.4-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

File diff suppressed because it is too large Load Diff

4488
hyphen.cs

File diff suppressed because it is too large Load Diff

100
nroff
View File

@ -1,100 +0,0 @@
#!/bin/bash
# Emulate nroff with groff.
prog="$0"
charset_in=iso-8859-1
charset_out=`locale charmap 2>/dev/null`
opts="-mtty-char"
T=""
for i
do
case $1 in
-c)
opts="$opts -P-c" ;;
-h)
opts="$opts -P-h" ;;
-[mrnoT])
echo $"option $1 requires an argument" >&2
exit 1 ;;
-[iptSUC] | -[mrno]*)
opts="$opts $1" ;;
-Tascii | -Tlatin1 | -Tutf8 | -Tcp1047 | -Tascii8 | -Tnippon | -Tkorean)
T=$1 ;;
-[eq] | -s* | -u* | -T*)
# ignore these options
;;
-v | --version)
echo $"GNU nroff (groff) with Red Hat i18n/l10n support"
exit 0 ;;
--legacy)
shift
charset_in=$1 ;;
--help)
echo $"usage: $prog [-cChipt] [-mNAME] [-nNUM] [--legacy CHARSET] [-oLIST] [-rCN] [FILE...]"
exit 0 ;;
--)
shift
break ;;
-)
break ;;
-*)
echo $"$prog: invalid option $1" >&2
exit 1 ;;
*)
break ;;
esac
shift
done
# Don't convert encodings when -T is specified
[ -n "$T" ] && exec /usr/bin/groff $opts $T ${1+"$@"} 2>/dev/null
opts="$opts -Tutf8"
if TMPFILE=$(mktemp /tmp/man.XXXXXX 2>/dev/null); then
trap "rm -f $TMPFILE" 0 1 2 3 15
cat ${1+"$@"} >| $TMPFILE
else
buf=$(cat ${1+"$@"})
TMPFILE=buf
fi
if [ $TMPFILE = buf ]; then
echo -n "$buf" | iconv -f utf-8 -t utf-8 &>/dev/null && charset_in=utf-8
else
iconv -f utf-8 -t utf-8 $TMPFILE &>/dev/null && charset_in=utf-8
fi
if [ $charset_in != utf-8 ]; then
echo $"WARNING: old character encoding and/or character set" >&2
fi
# en_US is chosen arbitrarily; any UTF-8 locale should work
export LC_ALL=en_US.UTF-8
# This shell script is intended for use with man, so warnings are
# probably not wanted. Also load nroff-style character definitions.
if [ $charset_in = utf-8 -a $charset_out = UTF-8 ]; then
if [ $TMPFILE = buf ]; then
echo -n "$buf" | /usr/bin/groff $opts 2>/dev/null
else
exec < $TMPFILE
rm -f $TMPFILE
exec /usr/bin/groff $opts 2>/dev/null
fi
else
if [ $TMPFILE = buf ]; then
echo -n "$buf" | \
/usr/bin/iconv -f $charset_in -t utf-8 | \
/usr/bin/groff $opts 2>/dev/null | \
/usr/bin/iconv -f utf-8 -t ${charset_out}//translit
else
/usr/bin/iconv -f $charset_in -t utf-8 $TMPFILE | \
/usr/bin/groff $opts 2>/dev/null | \
/usr/bin/iconv -f utf-8 -t ${charset_out}//translit
rm -f $TMPFILE
fi
fi
# eof

View File

@ -1,3 +1 @@
9bbf9b74fd587d248e17543bda4ce5de man-pages-ja-GNU_groff-20000115.tar.gz 48fa768dd6fdeb7968041dd5ae8e2b02 groff-1.20.1.tar.gz
e5d7f3273b4d53033723fcd2654d980c mandocj.tar.gz
ceecb81533936d251ed015f40e5f7287 groff-1.18.1.4.tar.gz