1
0
Files
src/Wip/head/head.c

27 lines
579 B
C

#include <stdio.h> /* fprintf(3), stderr */
#include <stdlib.h>
#include <unistd.h> /* getopt(3) */
static int lines = 10; /* POSIX.1 */
static char *program_name = "head";
int main(int argc, char *argv[]){
int c;
extern char *optarg;
extern int opterr, optind, optopt;
if(argc > 0)
program_name = argv[0];
while((c = getopt(argc, argv, "n:")) != -1)
switch(c){
case 'n':
break;
default:
#ifdef IGIT /* parse -[digit] options */
#endif /* ifdef IGIT */
usage: fprintf(stderr, "Usage: %s (-n [lines]) (file...)\n",
program_name);
return EX_USAGE;
}