# | Line 15 | Line 15 | char errmsg[128]; | |
---|---|---|
15 | ||
16 | ||
17 | ||
18 | – | error(errtype, emsg) /* report error */ |
19 | – | |
20 | – | int errtype; |
21 | – | char *emsg; |
22 | – | |
23 | – | { |
24 | – | |
25 | – | switch (errtype) { |
26 | – | |
27 | – | case WARNING: |
28 | – | wputs(progname); |
29 | – | wputs(": warning - "); |
30 | – | wputs(emsg); |
31 | – | wputs("\n"); |
32 | – | break; |
33 | – | |
34 | – | case USER: |
35 | – | eputs(progname); |
36 | – | eputs(": fatal - "); |
37 | – | eputs(emsg); |
38 | – | eputs("\n"); |
39 | – | exit(1); |
40 | – | break; |
41 | – | |
42 | – | case SYSTEM: |
43 | – | eputs(progname); |
44 | – | eputs(": system - "); |
45 | – | eputs(emsg); |
46 | – | eputs("\n"); |
47 | – | exit(1); |
48 | – | break; |
49 | – | } |
50 | – | |
51 | – | } |
52 | – | |
53 | – | |
54 | – | |
55 | – | |
18 | int | |
19 | comndx(c) /* return index for command */ | |
20 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |