Portability Changes to newsec.c
utzoo!decvax!harpo!floyd!vax135!ariel!houti!pegasus!jfd
utzoo!decvax!harpo!floyd!vax135!ariel!houti!pegasus!jfd
Sat Jan 15 12:18:26 AEST 1983
The following diff output shows the changes I've made to
newsec.c to enhance it's portability. I believe it's now
portable to most 32-bit machines. I've found it to be
a *really* handy program to have around! Thanks Tom!
john dooley
pegasus!jfd
ABI - Lincroft
_________________________________________________________________________
104a105
> int new_phr; /* added 1/83 for portability */
162,163c163,170
< for(c=cen;(*c=fgetc(f)) != EOF;c++) /* read in phrases to exclude */
< {
---
> /*
> for statement replaced with while and 'new_phr' for
> portability. (see pg 14 Kernighan & Ritchie for reason)
> */
> c = cen;
> while ((new_phr = fgetc(f)) != EOF)
> {
> *c = new_phr;
171c178,179
< }
---
> c++;
> }
224,225c232,241
< for(og=gg=linein;gg < eb &&
< (*gg=fgetc(fx)) != EOF ; gg++){
---
>
> /*
> for statement removed and while inserted, along with new_phr
> for portability.
> */
> og = linein;
> gg = linein;
> while ((gg < eb) && ((new_phr = fgetc(fx)) != EOF))
> {
> *gg = new_phr;
235c251,252
< }
---
> gg++;
> }
More information about the Comp.sources.unix
mailing list