1 |
< |
/* Copyright (c) 1991 Regents of the University of California */ |
1 |
> |
#ifndef lint |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
> |
#endif |
4 |
> |
/* |
5 |
> |
* Convert angle ranges of the form a-b:s,c to discrete values |
6 |
> |
*/ |
7 |
|
|
8 |
< |
/* SCCSid "$SunId$ LBL" */ |
4 |
< |
|
5 |
< |
/* Copyright (c) 1991 Regents of the University of California */ |
6 |
< |
|
8 |
> |
#include <stdlib.h> |
9 |
|
#include <ctype.h> |
10 |
|
|
11 |
< |
#define ANGLE short |
10 |
< |
#define AEND (-11111) |
11 |
> |
#include "setscan.h" |
12 |
|
|
13 |
< |
setscan(ang, arg) /* set up scan according to arg */ |
14 |
< |
register ANGLE *ang; |
15 |
< |
register char *arg; |
13 |
> |
int |
14 |
> |
setscan( /* set up scan according to arg */ |
15 |
> |
register ANGLE *ang, |
16 |
> |
register char *arg |
17 |
> |
) |
18 |
|
{ |
19 |
|
int state = ','; |
20 |
|
int start, finish, step; |
37 |
|
default: |
38 |
|
return(-1); |
39 |
|
} |
40 |
< |
if (!isdigit(*arg) && *arg != '-' && *arg != '+') |
40 |
> |
if (!isdigit(*arg)) |
41 |
|
return(-1); |
42 |
|
do |
43 |
|
arg++; |