1
0

backlog of changes from the uconsole

This commit is contained in:
dtb
2025-03-07 05:36:27 -07:00
parent 55bb27a1de
commit 9846c7ad27
50 changed files with 1207 additions and 726 deletions

View File

@@ -1,12 +1,26 @@
#include <stdio.h>
#include <stdio.h> /* fprintf(3), stderr */
#include <stdlib.h>
#include <unistd.h> /* getopt(3) */
/* The philosophical bits - /should this be a shell script?/ -
* are more complicated than the actual program. sed(1) is not currently a part
* of this project so there shouldn't be reliance on it. */
static int lines = 10; /* POSIX.1 */
static char *program_name = "head";
int main(int argc, char *argv[]){
char *argv0 = argv[0];
size_t i;
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;
}