5 int main(int argc
, char *argv
[])
12 openconsole(&dev_stdcon_r
, &dev_stdcon_w
);
15 fprintf(stderr
, "Usage: %s filename...\n", argv
[0]);
19 for (i
= 1; i
< argc
; i
++) {
20 f
= fopen(argv
[i
], "r");
22 fprintf(stderr
, "%s: %s: file not found\n", argv
[0], argv
[i
]);
26 while ((len
= fread(buf
, 1, sizeof buf
, f
)) > 0)
27 fwrite(buf
, 1, len
, stdout
);