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

Comparing ray/src/common/badarg.c (file contents):
Revision 1.1 by greg, Thu Nov 7 11:03:34 1991 UTC vs.
Revision 2.6 by schorsch, Fri Nov 14 17:22:06 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1991 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Check argument list against format string.
6 + *
7 + *  External symbols declared in rtio.h
8   */
9  
10 < #define NULL            0
10 > #include "copyright.h"
11  
12 + #include <ctype.h>
13 +
14 + #include "rtio.h"
15 +
16 +
17   int
18 < badarg(ac, av, fl)              /* check argument list */
19 < int     ac;
20 < register char   **av;
21 < register char   *fl;
18 > badarg(         /* check argument list */
19 > int     ac,
20 > register char   **av,
21 > register char   *fl
22 > )
23   {
24          register int  i;
25  
# Line 25 | Line 30 | register char  *fl;
30                          return(-1);
31                  switch (*fl) {
32                  case 's':               /* string */
33 <                        if (**av == '\0' || **av == ' ' || **av == '\t')
33 >                        if (**av == '\0' || isspace(**av))
34                                  return(i);
35                          break;
36                  case 'i':               /* integer */
37 <                        if (!isintd(*av, " \t"))
37 >                        if (!isintd(*av, " \t\r\n"))
38                                  return(i);
39                          break;
40                  case 'f':               /* float */
41 <                        if (!isfltd(*av, " \t"))
41 >                        if (!isfltd(*av, " \t\r\n"))
42                                  return(i);
43                          break;
44                  default:                /* bad call! */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines