28 |
|
int tabc = '\t'; /* default separator */ |
29 |
|
int subtotal = 0; /* produce subtotals? */ |
30 |
|
|
31 |
+ |
static int execute(char *fname); |
32 |
|
|
33 |
< |
main(argc, argv) |
34 |
< |
int argc; |
35 |
< |
char *argv[]; |
33 |
> |
int |
34 |
> |
main( |
35 |
> |
int argc, |
36 |
> |
char *argv[] |
37 |
> |
) |
38 |
|
{ |
39 |
|
int status; |
40 |
|
int a; |
95 |
|
} |
96 |
|
|
97 |
|
|
98 |
< |
execute(fname) /* compute result */ |
99 |
< |
char *fname; |
98 |
> |
static int |
99 |
> |
execute( /* compute result */ |
100 |
> |
char *fname |
101 |
> |
) |
102 |
|
{ |
103 |
|
double result[MAXCOL]; |
104 |
|
char buf[16*MAXCOL]; |
117 |
|
} |
118 |
|
ltotal = 0; |
119 |
|
while (!feof(fp)) { |
120 |
< |
if (ltotal == 0) /* initialize */ |
120 |
> |
if (ltotal == 0) { /* initialize */ |
121 |
|
if (func == MULT) /* special case */ |
122 |
|
for (n = 0; n < MAXCOL; n++) |
123 |
|
result[n] = 0.0; |
124 |
|
else |
125 |
|
for (n = 0; n < MAXCOL; n++) |
126 |
|
result[n] = init_val[func]; |
127 |
+ |
} |
128 |
|
ncol = 0; |
129 |
|
for (nlin = 0; (count <= 0 || nlin < count) && |
130 |
|
(cp = fgets(buf, sizeof(buf), fp)) != NULL; |