annotate 3rdparty/packages/cc/sources/line.c @ 1558:4a4ff4d844ef
ccdisk.asm: this is "newdisk" found on google, replaces old ccdisk which
had severe reliability problems.
rbfdefs: since "newdisk" uses the same step codes as cc3disk, rbfdefs was
modified to reflect this.
sysgo.asm: Date changed to May 14, 2004 to reflect updated 03.02.01
release.
ChangeLogs: reflect updated version info.
author |
boisy |
date |
Thu, 13 May 2004 14:19:49 +0000 |
parents |
0198655f2552 |
children |
|
rev |
line source |
867
|
1 /* line: list lines of file with numbers */
|
|
2
|
|
3 #include <stdio.h>
|
|
4
|
|
5 main(argc,argv)
|
|
6 char **argv;
|
|
7 {
|
|
8 char line[256];
|
|
9 register int count = 0;
|
|
10
|
|
11 if(--argc)
|
|
12 if(freopen(*++argv,"r",stdin) == NULL) {
|
|
13 fprintf(stderr,"can't open file: %s\n",*argv);
|
|
14 exit(errno);
|
|
15 }
|
|
16
|
|
17 while(gets(line))
|
|
18 printf("%5d %s\n",++count,line);
|
|
19 }
|