-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added: dictfmt.1, dictfmt_index2suffix, patched version of dictfmt.c
several changes in dictd.8 fixed: typo in utf8_ucs4.c added: uninstall target in Makefile.in Now dictfmt is a part of dictd distribution
- Loading branch information
Showing
7 changed files
with
1,032 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,12 +17,12 @@ | |
# with this program; if not, write to the Free Software Foundation, Inc., | ||
# 675 Mass Ave, Cambridge, MA 02139, USA. | ||
# | ||
# $Id: Makefile.in,v 1.50 2002/08/05 14:58:49 cheusov Exp $ | ||
# $Id: Makefile.in,v 1.51 2002/08/12 16:27:33 cheusov Exp $ | ||
# | ||
|
||
# Add a _letter_ if you change the version number and release your own version. | ||
# Numbers are for the original author(s) only. | ||
DICT_VERSION=1.7.1 | ||
DICT_VERSION=1.8.0 | ||
|
||
ifneq (,) | ||
This makefile requires GNU Make. | ||
|
@@ -61,9 +61,10 @@ XTRACFLAGS= @WCFLAGS@ @XTRACFLAGS@ @DEFS@ @CPPFLAGS@ -I. -Iregex | |
XTRALDFLAGS= @WLDFLAGS@ @XTRALDFLAGS@ | ||
LDLIBS= @LIBS@ -Lregex -lregex | ||
|
||
EXES= dict dictd dictzip | ||
EXES= dict dictd dictzip dictfmt | ||
|
||
HEADERS= ./config.h @XTRAHEADERS@ dictzip.h dictd.h dict.h codes.h md5.h | ||
HEADERS= ./config.h @XTRAHEADERS@ dictzip.h dictd.h dict.h \ | ||
codes.h md5.h utf8_ucs4.h | ||
|
||
SRCHOBJS= index.o data.o utf8_ucs4.o | ||
NETOBJS= daemon.o net.o servscan.o servparse.o md5.o | ||
|
@@ -108,7 +109,10 @@ dictd:: dictd.c $(HEADERS) $(NETOBJS) $(SRCHOBJS) | |
$(CC) $(ALLFLAGS) -o $@ $< $(NETOBJS) $(SRCHOBJS) $(ZIPOBJS) $(LDLIBS) | ||
|
||
dictzip:: dictzip.c $(HEADERS) $(SRCHOBJS) | ||
$(CC) $(ALLFLAGS) -o $@ $< $(SRCHOBJS) $(LDLIBS) | ||
$(CC) $(ALLFLAGS) -o $@ $< $(SRCHOBJS) $(LDLIBS) | ||
|
||
dictfmt:: dictfmt.c $(HEADERS) utf8_ucs4.o | ||
$(CC) $(ALLFLAGS) -o $@ $< utf8_ucs4.o $(LDLIBS) | ||
|
||
servscan.c: servscan.l | ||
$(LEX) $(LFLAGS) -o$@ $< | ||
|
@@ -140,37 +144,65 @@ clientparse.c: clientparse.y | |
clientparse.o: clientparse.c $(HEADERS) | ||
$(CC) -c $(XTRACFLAGS) $(CFLAGS) $(SCFLAGS) $< | ||
|
||
.PHONY: install.dict install.dictzip install.dictfmt install.dictd | ||
|
||
install.dict: dict | ||
if test ! -d $(bindir); then $(INSTALL) -d 755 $(bindir); fi | ||
if test ! -d $(man1_prefix); then $(INSTALL) -d 755 $(man1_prefix); fi | ||
$(INSTALL_PROGRAM) dict $(bindir) | ||
$(INSTALL_DATA dict.1 $(man1_prefix)/dict.1 | ||
$(INSTALL_DATA) dict.1 $(man1_prefix)/dict.1 | ||
|
||
install.dictzip: dictzip | ||
if test ! -d $(bindir); then $(INSTALL) -d 755 $(bindir); fi | ||
if test ! -d $(man1_prefix); then $(INSTALL) -d 755 $(man1_prefix); fi | ||
$(INSTALL_PROGRAM) dictzip $(bindir) | ||
$(INSTALL_DATA) dictzip.1 $(man1_prefix)/dictzip.1 | ||
|
||
install.dictfmt: dictfmt | ||
if test ! -d $(bindir); then $(INSTALL) -d 755 $(bindir); fi | ||
if test ! -d $(man1_prefix); then $(INSTALL) -d 755 $(man1_prefix); fi | ||
$(INSTALL_PROGRAM) dictfmt $(bindir) | ||
$(INSTALL_DATA) dictfmt.1 $(man1_prefix)/dictfmt.1 | ||
|
||
install.dictd: dictd | ||
if test ! -d $(sbindir); then $(INSTALL) -d 755 $(sbindir); fi | ||
if test ! -d $(man8_prefix); then install -d 755 $(man8_prefix); fi | ||
$(INSTALL_PROGRAM) dictd $(sbindir) | ||
$(INSTALL_DATA) dictd.8 $(man8_prefix)/dictd.8 | ||
|
||
install: $(EXES) install.dict install.dictzip install.dictd | ||
.PHONY: install | ||
|
||
install: $(EXECS) install.dict install.dictzip install.dictd install.dictfmt | ||
|
||
.PHONY: uninstall.dict uninstall.dictzip uninstall.dictfmt uninstall.dictd | ||
|
||
uninstall.dict: | ||
rm -f $(bindir)/dict $(man1_prefix)/dict.1 | ||
|
||
uninstall.dictzip: | ||
rm -f $(bindir)/dictzip $(man1_prefix)/dictzip.1 | ||
|
||
uninstall.dictd: | ||
rm -f $(sbindir)/dictd $(man8_prefix)/dictd.8 | ||
|
||
uninstall.dictfmt: | ||
rm -f $(bindir)/dictfmt $(man1_prefix)/dictfmt.1 | ||
|
||
.PHONY: uninstall | ||
|
||
uninstall: uninstall.dict uninstall.dictd uninstall.dictfmt uninstall.dictzip | ||
|
||
.PHONY: ChangeLog | ||
ChangeLog: | ||
@(echo "***** Making new ChangeLog..."; \ | ||
rm -f ChangeLog; \ | ||
AWK=gawk rcs2log -i 2 -r -d'1996-09-20<' . doc regex zlib libmaa \ | ||
| sed 's,/cvsroot/dict/dictd1/,,g' \ | ||
| sed 's,/cvs/dict/dictd1/,,g' \ | ||
| sed 's/cheusov[^>]*/Aleksey Cheusov <[email protected]/' \ | ||
| sed 's,faith@[^>]*,[email protected],g' \ | ||
| sed 's,hilliard...hilliard@.*,Bob Hilliard <[email protected]>,g'\ | ||
| sed 's,tek...tek@.*,Julian Squires <[email protected]>,g' \ | ||
| sed 's,/cvsroot/dict/dictd1/,,g; \ | ||
s,/cvs/dict/dictd1/,,g;\ | ||
s/cheusov[^>]*/Aleksey Cheusov <[email protected]/;\ | ||
s,faith@[^>]*,[email protected],g;\ | ||
s,hilliard...hilliard@.*,Bob Hilliard <[email protected]>,g; | ||
s,tek...tek@.*,Julian Squires <[email protected]>,g' \ | ||
> ChangeLog;) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
.\" dictfmt.1 -- | ||
.\" Created: Sat, 23 Dec 2000 13:56:42 -0500 by [email protected] | ||
.\" Copyright 2000 Robert D. Hilliard <[email protected]> | ||
.\" | ||
.\" Permission is granted to make and distribute verbatim copies of this | ||
.\" manual provided the copyright notice and this permission notice are | ||
.\" preserved on all copies. | ||
.\" | ||
.\" Permission is granted to copy and distribute modified versions of this | ||
.\" manual under the conditions for verbatim copying, provided that the | ||
.\" entire resulting derived work is distributed under the terms of a | ||
.\" permission notice identical to this one | ||
.\" | ||
.\" Since the Linux kernel and libraries are constantly changing, this | ||
.\" manual page may be incorrect or out-of-date. The author(s) assume no | ||
.\" responsibility for errors or omissions, or for damages resulting from | ||
.\" the use of the information contained herein. The author(s) may not | ||
.\" have taken the same level of care in the production of this manual, | ||
.\" which is licensed free of charge, as they might when working | ||
.\" professionally. | ||
.\" | ||
.\" Formatted or processed versions of this manual, if unaccompanied by | ||
.\" the source, must acknowledge the copyright and authors of this work. | ||
.\" | ||
.TH DICTFMT 1 "25 December 2000" "" "" | ||
.SH NAME | ||
dictfmt \- formats a DICT protocol dictionary database | ||
.SH SYNOPSIS | ||
.nf | ||
.BI dictfmt " -c5|-e|-f|-h|-j|-p -u url -s name basename" | ||
.fi | ||
.SH DESCRIPTION | ||
.B dictfmt | ||
takes a file, | ||
.I FILE, | ||
on stdin, and creates a dictionary database named | ||
.I basename.dict, | ||
that conforms to the DICT protocol. It also creates an index file named | ||
.I basename.index. ( | ||
.IR basename " is commonly chosen to correspond to the basename of" | ||
.I FILE | ||
, but this is not mandatory.) | ||
|
||
Unless the database is extremely small, it is | ||
highly recommended that | ||
.I basename.dict | ||
be compressed with | ||
.I /usr/bin/dictzip | ||
to create | ||
.I basename.dict.dz. | ||
(dictzip is included in | ||
the | ||
.B dictd | ||
package.) | ||
.P | ||
FILE may be in any of the several formats described by | ||
the format options \-c5,-e,\-f,\-h,\-j, or \-p. Exactly one of | ||
these options must be given. | ||
.P | ||
Headers are prepended to the file giving the URL of the site from | ||
which the original database was obtained, and the name of the | ||
dictionary. If the -u and/or -s options are omitted, the value | ||
"unknown" will be included in these headers, which is undesirable. A | ||
header giving the date of conversion is also added. | ||
.SH OPTIONS | ||
.TP | ||
.BI \-c5 | ||
.I | ||
FILE | ||
is formatted with | ||
.B headwords | ||
preceded by 5 or more underscore characters (_) and a blank line. | ||
All text until the next | ||
.B headword | ||
is considered the definition. If the | ||
.B headwords | ||
are all caps, they are changed to mixed case. Any leading `@' | ||
characters are stripped out, but the file is otherwise unchanged. This | ||
option was written to format the CIA WORLD FACTBOOK 1995. | ||
.TP | ||
.BI \-e | ||
.I | ||
FILE | ||
is in html format, with the | ||
.B headword | ||
tagged as bold. (<B>headword - </B>) | ||
.RS | ||
This option was written to format EASTON'S 1897 BIBLE DICTIONARY. The | ||
head of a typical entry from Easton is: | ||
.P | ||
<A NAME="T0000005"> | ||
.br | ||
<B>Abagtha - </B> | ||
.br | ||
one of the seven eunuchs in Ahasuerus's court (Esther 1:10; | ||
2:21). | ||
|
||
This is converted to: | ||
.br | ||
Abagtha | ||
.br | ||
one of the seven eunuchs in Ahasuerus's court (Esther 1:10; | ||
2:21). | ||
|
||
The | ||
.B headword | ||
`Abagtha' is indexed. | ||
|
||
.B NOTE: | ||
This option should be used with caution. It removes several | ||
html tags (enough to format Easton properly), but not all. The | ||
Makefile for dict-misc uses a sed script to modify certain cross | ||
reference tags. It may be necessary to pipe the input file through a | ||
sed script, or hack the source of dictfmt in order to properly format | ||
other html databases. | ||
.RE | ||
.TP | ||
.BI \-f | ||
.I FILE | ||
is formatted with the | ||
.B headword | ||
starting in column 0, followed by a blank line, with the definition | ||
indented 8 spaces (or one tab character) on subsequent lines. This | ||
option was written to format the FOLDOC. | ||
.TP | ||
.BI \-h | ||
.I | ||
FILE | ||
is formatted with the | ||
.B headword | ||
starting in column 0, followed by a comma, with the definition | ||
continuing on the same line. | ||
.RS | ||
This option was written to format HITCHCOCK'S BIBLE | ||
NAMES DICTIONARY. The | ||
.B headword | ||
is indexed; the text of the file is not changed. | ||
.RE | ||
.TP | ||
.BI \-j | ||
.I | ||
FILE | ||
is formatted with | ||
.B headwords | ||
surrounded by colons, followed by the definition. | ||
.RS | ||
This option was written to format the JARGON FILE. The colons | ||
surrounding the | ||
.B headword | ||
are removed, and the | ||
.B headword | ||
is indexed. | ||
|
||
.B NOTE: | ||
Recent versions of the jargon file insert three blanks before the | ||
first colon at each headword. These must be removed before processing | ||
with dictfmt. (sed scripts have been used for this purpose. ed, awk, | ||
or perl scripts are also possible.) | ||
.RE | ||
.TP | ||
.BI \-p | ||
.I | ||
FILE | ||
is formatted with `%h' in column 0, followed by a blank, followed by the | ||
.B headword | ||
, followed by a line containing `%d' in column 0. The definition | ||
starts on the following line. | ||
..br | ||
This option was written to format Jay Kominek's elements database. | ||
.TP | ||
.BI \-u " url" | ||
Specifies the URL of the site from which the raw database was obtained. | ||
.TP | ||
.BI \-s " name" | ||
Specifies the name and, optionally, the version and date, of the | ||
database. (If this contains spaces, it must be quoted.) | ||
.TP | ||
.BI \-L | ||
display license and copyright information | ||
.TP | ||
.BI \-V | ||
display version information | ||
.TP | ||
.BI \-D | ||
output debuugging information | ||
.TP | ||
.BI \--help | ||
display a help message | ||
.SH CREDITS | ||
.B dictfmt | ||
was written by Rik Faith ([email protected]) as part of the dict-misc | ||
package, and modified by Robert D. Hilliard <[email protected]> to | ||
be a stand-alone package. It is distributed under the terms of the | ||
GNU General Public License. If you need to distribute under other | ||
terms, write to the author. | ||
.P | ||
.SH "SEE ALSO" | ||
.BR dict (1), | ||
.BR dictd (8), | ||
.BR dictzip (1), | ||
.BR http://www.dict.org, | ||
.B RFC 2229 |
Oops, something went wrong.