ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/wordfile.c
(Generate patch)

Comparing ray/src/common/wordfile.c (file contents):
Revision 2.22 by schorsch, Fri May 13 09:12:19 2016 UTC vs.
Revision 2.24 by greg, Sat Dec 28 18:05:14 2019 UTC

# Line 10 | Line 10 | static const char      RCSid[] = "$Id$";
10   #include "copyright.h"
11  
12   #include <ctype.h>
13 #include <string.h>
13  
14   #include "platform.h"
15   #include "rtio.h"
# Line 29 | Line 28 | wordfile(                      /* get words from fname, put in words */
28   {
29          int     wrdcnt = 0;
30          int     n = 0;
32        int dlen = 0;
31          int     fd;
32          char    buf[MAXWLEN];
33                                          /* load file into buffer */
# Line 41 | Line 39 | wordfile(                      /* get words from fname, put in words */
39                  return(-1);                     /* open error */
40          words[0] = NULL;
41          while (nargs > 1 && (n += read(fd, buf+n, MAXWLEN-n)) > 0) {
42 <                dlen = n;
42 >                int     dlen = n;
43                  int     crem = 0;
44                  if (n > MAXWLEN/2)              /* check for mid-word end */
45                          while (!isspace(buf[--n])) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines