Mercurial > hg > Members > kono > nitros9-code
view 3rdparty/packages/cc/sources/line.c @ 1942:b41df77588b0
printer is now scbbp
sio is now scbbt
All references changed in various files
author | boisy |
---|---|
date | Sat, 26 Nov 2005 22:51:50 +0000 |
parents | 0198655f2552 |
children |
line wrap: on
line source
/* line: list lines of file with numbers */ #include <stdio.h> main(argc,argv) char **argv; { char line[256]; register int count = 0; if(--argc) if(freopen(*++argv,"r",stdin) == NULL) { fprintf(stderr,"can't open file: %s\n",*argv); exit(errno); } while(gets(line)) printf("%5d %s\n",++count,line); }