8 void debug(const char *fmt
, ...) {
10 if (getenv("DEBUG")) {
12 vfprintf(stderr
, fmt
, ap
);
17 int main(int argc
, char **argv
) {
18 size_t len
= 0, count
= 0;
19 int i
, sum1
= 0, sum2
= 0;
23 if (!(stdin
= freopen(argv
[1], "r", stdin
))) {
28 while (getline(&line
, &len
, stdin
) >= 0) {
32 fprintf(stderr
, "bad input\n");
41 printf("Read %zu lines, sum1 %d, sum2 %d\n", count
, sum1
, sum2
);