| 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 standard.h | 
| 8 | 
  | 
 */ | 
| 9 | 
  | 
 | 
| 10 | 
< | 
#define NULL            0 | 
| 10 | 
> | 
#include "copyright.h" | 
| 11 | 
  | 
 | 
| 12 | 
+ | 
#include <ctype.h> | 
| 13 | 
+ | 
 | 
| 14 | 
+ | 
#include "standard.h" | 
| 15 | 
+ | 
 | 
| 16 | 
+ | 
 | 
| 17 | 
  | 
int | 
| 18 | 
  | 
badarg(ac, av, fl)              /* check argument list */ | 
| 19 | 
  | 
int     ac; | 
| 29 | 
  | 
                        return(-1); | 
| 30 | 
  | 
                switch (*fl) { | 
| 31 | 
  | 
                case 's':               /* string */ | 
| 32 | 
< | 
                        if (**av == '\0' || **av == ' ' || **av == '\t') | 
| 32 | 
> | 
                        if (**av == '\0' || isspace(**av)) | 
| 33 | 
  | 
                                return(i); | 
| 34 | 
  | 
                        break; | 
| 35 | 
  | 
                case 'i':               /* integer */ | 
| 36 | 
< | 
                        if (!isintd(*av, " \t")) | 
| 36 | 
> | 
                        if (!isintd(*av, " \t\r\n")) | 
| 37 | 
  | 
                                return(i); | 
| 38 | 
  | 
                        break; | 
| 39 | 
  | 
                case 'f':               /* float */ | 
| 40 | 
< | 
                        if (!isfltd(*av, " \t")) | 
| 40 | 
> | 
                        if (!isfltd(*av, " \t\r\n")) | 
| 41 | 
  | 
                                return(i); | 
| 42 | 
  | 
                        break; | 
| 43 | 
  | 
                default:                /* bad call! */ |