diff options
author | mdodd <mdodd@FreeBSD.org> | 2003-02-22 20:14:57 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 2003-02-22 20:14:57 +0000 |
commit | 9e8e0ef8cc627ff08c61850429d35c9b6b9aa23e (patch) | |
tree | 09bf22ec2d6094d932a154f6a5418dac05a82728 /textproc/ispell/files | |
parent | c2718b04c061268d7b9fac285d06a0c1bcfc67f9 (diff) | |
download | FreeBSD-ports-9e8e0ef8cc627ff08c61850429d35c9b6b9aa23e.zip FreeBSD-ports-9e8e0ef8cc627ff08c61850429d35c9b6b9aa23e.tar.gz |
Provide a limited compatibility with the Unix spell command.
Approved by: jmz
Diffstat (limited to 'textproc/ispell/files')
-rw-r--r-- | textproc/ispell/files/patch-ispell.1X | 53 | ||||
-rw-r--r-- | textproc/ispell/files/patch-ispell.c | 90 | ||||
-rw-r--r-- | textproc/ispell/files/patch-ispell.h | 10 |
3 files changed, 153 insertions, 0 deletions
diff --git a/textproc/ispell/files/patch-ispell.1X b/textproc/ispell/files/patch-ispell.1X new file mode 100644 index 0000000..2c9158f --- /dev/null +++ b/textproc/ispell/files/patch-ispell.1X @@ -0,0 +1,53 @@ +--- ispell.1X.orig Wed Jul 25 17:51:46 2001 ++++ ispell.1X Sat Feb 22 14:51:32 2003 +@@ -106,7 +106,7 @@ + .\" + .TH ISPELL 1 local + .SH NAME +-ispell, buildhash, munchlist, findaffix, tryaffix, icombine, ijoin \- Interactive ++ispell, spell, buildhash, munchlist, findaffix, tryaffix, icombine, ijoin \- Interactive + spelling checking + .SH SYNOPSIS + .B ispell +@@ -148,6 +148,11 @@ + .br + .B ispell + .BR \-v [ v ] ++.br ++.B ispell ++.BR \-u ++.RB [ files ] ++.br + .IP \fIcommon-flags\fP: + .RB [ \-t ] + .RB [ \-n ] +@@ -174,6 +179,9 @@ + .RB [ \-F + .IR program ] + .PP ++.B spell ++.RB [ files ] ++.PP + .B buildhash + .RB [ \-s ] + .I +@@ -737,6 +745,19 @@ + or "list" option to + .I ispell + is used to produce a list of misspelled words from the standard input. ++.PP ++The ++.B \-u ++option to ++.I ispell ++provides backwards compatibility with the Unix spell command. ++When ++.I ispell ++is invoked as ++.I spell ++the ++.B \-u ++option is implied. + .PP + The + .B \-a diff --git a/textproc/ispell/files/patch-ispell.c b/textproc/ispell/files/patch-ispell.c new file mode 100644 index 0000000..24dc68c --- /dev/null +++ b/textproc/ispell/files/patch-ispell.c @@ -0,0 +1,90 @@ +--- ispell.c.orig Wed Jul 25 17:51:46 2001 ++++ ispell.c Sat Feb 22 14:24:29 2003 +@@ -209,6 +209,7 @@ + #include <fcntl.h> + #endif /* NO_FCNTL_H */ + #include <sys/stat.h> ++#include <libgen.h> + + static void usage P ((void)); + static void initckch P ((char * wchars)); +@@ -327,6 +328,7 @@ + char ** versionp; + char * wchars = NULL; + char * preftype = NULL; ++ char * cmdname; + static char libdictname[sizeof DEFHASH]; + static char outbuf[BUFSIZ]; + int argno; +@@ -334,6 +336,11 @@ + + Cmd = *argv; + ++ cmdname = (char *)basename(argv[0]); ++ if (strncmp(cmdname, "spell", 5) == 0) { ++ uflag++; ++ } ++ + Trynum = 0; + + p = getenv ("DICTIONARY"); +@@ -792,6 +799,11 @@ + LibDict = p + 1; + } + break; ++ case 'u': ++ if (arglen > 2) ++ usage (); ++ uflag++; ++ break; + case 'V': /* Display 8-bit characters as M-xxx */ + if (arglen > 2) + usage (); +@@ -827,7 +839,7 @@ + argc--; + } + +- if (!argc && !lflag && !aflag && !eflag && !dumpflag) ++ if (!argc && !lflag && !aflag && !eflag && !dumpflag && !uflag) + { + if (argc != 0) + usage (); +@@ -848,7 +860,7 @@ + if (access (argv[argno], 4) >= 0) + break; + } +- if (argno >= argc && !lflag && !aflag && !eflag && !dumpflag) ++ if (argno >= argc && !lflag && !aflag && !eflag && !dumpflag && !uflag) + { + (void) fprintf (stderr, + argc == 1 ? ISPELL_C_NO_FILE : ISPELL_C_NO_FILES); +@@ -935,6 +947,29 @@ + outfile = stdout; + checkfile (); + exit (0); ++ } ++ ++ if (uflag) ++ { ++ lflag++; ++ if (!argc) ++ { ++ infile = setupdefmt(NULL); ++ outfile = stdout; ++ checkfile (); ++ exit (0); ++ } ++ else ++ { ++ while (argc--) ++ { ++ infile = setupdefmt (*argv++); ++ outfile = stdout; ++ checkfile (); ++ (void) fclose (infile); ++ } ++ exit (0); ++ } + } + + terminit (); diff --git a/textproc/ispell/files/patch-ispell.h b/textproc/ispell/files/patch-ispell.h new file mode 100644 index 0000000..5344777 --- /dev/null +++ b/textproc/ispell/files/patch-ispell.h @@ -0,0 +1,10 @@ +--- ispell.h.orig Sat Feb 22 13:53:04 2003 ++++ ispell.h Sat Feb 22 14:11:29 2003 +@@ -702,6 +702,7 @@ + INIT (int deftflag, -1); /* Default deformatting mode, chosen */ + /* ..from DEFORMAT_* values */ + INIT (int tflag, DEFTEXFLAG); /* Deformatting for current file */ ++INIT (int uflag, 0); /* NZ if -u (spell compat) option */ + INIT (int prefstringchar, -1); /* Preferred string character type */ + + INIT (int insidehtml, 0); /* Flag to indicate we're amid HTML */ |