1 |
– |
/* Copyright (c) 1995 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 |
|
* Filter MGF stream, removing entities that won't be understood |
6 |
|
*/ |
7 |
|
|
8 |
|
#include <stdio.h> |
9 |
+ |
#include <stdlib.h> |
10 |
|
#include "parser.h" |
11 |
|
|
12 |
|
/* Number of entities for major versions */ |
14 |
|
|
15 |
|
|
16 |
|
int |
17 |
< |
put_entity(ac, av) /* general output routine */ |
18 |
< |
register int ac; |
19 |
< |
register char **av; |
17 |
> |
put_entity( /* general output routine */ |
18 |
> |
register int ac, |
19 |
> |
register char **av |
20 |
> |
) |
21 |
|
{ |
22 |
|
while (ac-- > 0) { |
23 |
|
fputs(*av++, stdout); |
27 |
|
} |
28 |
|
|
29 |
|
|
30 |
< |
main(argc, argv) /* first argument is understood entities, comma-sep. */ |
31 |
< |
int argc; |
32 |
< |
char *argv[]; |
30 |
> |
int |
31 |
> |
main( /* first argument is understood entities, comma-sep. */ |
32 |
> |
int argc, |
33 |
> |
char *argv[] |
34 |
> |
) |
35 |
|
{ |
36 |
|
char *cp1, *cp2; |
37 |
|
int i, en; |
44 |
|
} |
45 |
|
if (isint(argv[1])) { |
46 |
|
i = atoi(argv[1]); |
47 |
< |
if (i < 1 | i > MG_VMAJOR) { |
47 |
> |
if ((i < 1) | (i > MG_VMAJOR)) { |
48 |
|
fprintf(stderr, "%s: bad version number: %d\n", |
49 |
|
argv[0], i); |
50 |
|
exit(1); |