updates to correct
david at varian.UUCP
david at varian.UUCP
Thu Nov 10 03:57:36 AEST 1983
As long as everyone is posting their changes to correct, I thought I'd
put in my 2 cents worth. Since we have four Englishmen in our
department, the first problem noticed was there was no way to use
British spelling. It was a simple thing to add the -b flag, which gets
passed on to spell (see below). I have not yet integrated this change
with Dave Olson's improved version.
Other criticisms I have (which I haven't fixed) are that it should be
usable in a pipe (i.e. as a filter), and the invocation of look only
checks /usr/dict/words; it should also search the user's local
dictionary (if given) and the american or british and local lists in
/usr/src/cmd/spell (or copies thereof if /usr/src is read-protected).
Other than that, I think it's a good idea; thank you Alan!
David Brown (415) 945-2199
Varian Instruments 2700 Mitchell Dr. Walnut Creek, Ca. 94598
{ihnp4,tektronix,sytek,dual}!zehntel!varian!david
{amd70,fortune}!varian!david
...!decvax!sytek!zehntel!varian!david
...!ucbvax!menlo70!sytek!zehntel!varian!david
*** correct.c Fri Nov 4 14:50:22 1983
--- correct.c.00 Fri Nov 4 14:05:14 1983
***************
*** 15,21
#define EX "/usr/ucb/ex"
#include <stdio.h>
/*#define DEBUG*/
! #define SYNTAX "usage: correct [-d locdict] [-b] file"
#define STRLEN 100
#define NOWORDS 100
#ifdef vax
--- 13,19 -----
#define EX "/usr/ucb/ex"
#include <stdio.h>
/*#define DEBUG*/
! #define SYNTAX "usage: correct [-d locdict] file"
#define STRLEN 100
#define NOWORDS 100
#ifdef vax
***************
*** 43,50
char *index();
char sDelim[] = "/%$#*[]";
- int britflag = 0; /* British spelling ? */
-
main(argc, argv)
int argc;
char *argv[];
--- 41,46 -----
char *index();
char sDelim[] = "/%$#*[]";
main(argc, argv)
int argc;
char *argv[];
***************
*** 76,85
}
else Faterr(SYNTAX);
break;
- case 'b':
- britflag++;
- fprintf(stderr,"Using British spelling\n");
- break;
default :
Faterr(SYNTAX);
break;
--- 72,77 -----
}
else Faterr(SYNTAX);
break;
default :
Faterr(SYNTAX);
break;
***************
*** 94,103
bCorrflag = bLocdictflag = 0;
! if (britflag)
! sprintf(command,"%s -b %s",SPELL,psFile);
! else
! sprintf(command,"%s %s",SPELL,psFile);
printf("Running spell ....\n");
if ((fpspell = popen(command,"r")) == NULL)
{
--- 86,92 -----
bCorrflag = bLocdictflag = 0;
! sprintf(command,"%s %s",SPELL,psFile);
printf("Running spell ....\n");
if ((fpspell = popen(command,"r")) == NULL)
{
More information about the Comp.sources.unix
mailing list