003 File Manager
Current Path:
/usr/src/bin/pax
usr
/
src
/
bin
/
pax
/
📁
..
📄
Makefile
(1.4 KB)
📄
Makefile.depend
(273 B)
📄
ar_io.c
(31.94 KB)
📄
ar_subs.c
(30.77 KB)
📄
buf_subs.c
(26.24 KB)
📄
cache.c
(9.57 KB)
📄
cache.h
(3.15 KB)
📄
cpio.c
(28.77 KB)
📄
cpio.h
(5.45 KB)
📄
extern.h
(6.95 KB)
📄
file_subs.c
(24.69 KB)
📄
ftree.c
(14.02 KB)
📄
ftree.h
(2.2 KB)
📄
gen_subs.c
(9.55 KB)
📄
getoldopt.c
(1.47 KB)
📄
options.c
(32.46 KB)
📄
options.h
(3.97 KB)
📄
pat_rep.c
(28.46 KB)
📄
pat_rep.h
(2.29 KB)
📄
pax.1
(30.28 KB)
📄
pax.c
(14.56 KB)
📄
pax.h
(9.91 KB)
📄
sel_subs.c
(13.38 KB)
📄
sel_subs.h
(2.78 KB)
📄
tables.c
(34.81 KB)
📄
tables.h
(7.46 KB)
📄
tar.c
(28.64 KB)
📄
tar.h
(5.13 KB)
📁
tests
📄
tty_subs.c
(4.72 KB)
Editing: getoldopt.c
/* $OpenBSD: getoldopt.c,v 1.9 2009/10/27 23:59:22 deraadt Exp $ */ /* $NetBSD: getoldopt.c,v 1.3 1995/03/21 09:07:28 cgd Exp $ */ /*- * Plug-compatible replacement for getopt() for parsing tar-like * arguments. If the first argument begins with "-", it uses getopt; * otherwise, it uses the old rules used by tar, dump, and ps. * * Written 25 August 1985 by John Gilmore (ihnp4!hoptoad!gnu) and placed * in the Public Domain for your edification and enjoyment. */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include <string.h> #include <unistd.h> int getoldopt(int, char **, const char *); int getoldopt(int argc, char **argv, const char *optstring) { static char *key; /* Points to next keyletter */ static char use_getopt; /* !=0 if argv[1][0] was '-' */ char c; char *place; optarg = NULL; if (key == NULL) { /* First time */ if (argc < 2) return (-1); key = argv[1]; if (*key == '-') use_getopt++; else optind = 2; } if (use_getopt) return (getopt(argc, argv, optstring)); c = *key++; if (c == '\0') { key--; return (-1); } place = strchr(optstring, c); if (place == NULL || c == ':') { fprintf(stderr, "%s: unknown option %c\n", argv[0], c); return ('?'); } place++; if (*place == ':') { if (optind < argc) { optarg = argv[optind]; optind++; } else { fprintf(stderr, "%s: %c argument missing\n", argv[0], c); return ('?'); } } return (c); }
Upload File
Create Folder