# | Line 38 | Line 38 | wordfile( /* get words from fname, put in words */ | |
---|---|---|
38 | return(-1); | |
39 | if ((fd = open(fname, 0)) < 0) | |
40 | return(-1); /* open error */ | |
41 | + | SET_FD_BINARY(fd); /* Windows bug workaround */ |
42 | words[0] = NULL; | |
43 | while (nargs > 1 && (n += read(fd, buf+n, MAXWLEN-n)) > 0) { | |
44 | int crem = 0; | |
45 | < | if (n >= MAXWLEN) /* still something left? */ |
45 | > | if (n > MAXWLEN/2) /* check for mid-word end */ |
46 | while (!isspace(buf[--n])) { | |
47 | if (n <= 0) /* one long word! */ | |
48 | goto done; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |