From 439af39772e6e04a6734a037b91c7f8f7c93ba1a Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Sat, 30 Dec 2023 07:59:45 +0100 Subject: [PATCH] remove skeleton file --- skel.c | 68 ---------------------------------------------------------- 1 file changed, 68 deletions(-) delete mode 100644 skel.c diff --git a/skel.c b/skel.c deleted file mode 100644 index 2219fca..0000000 --- a/skel.c +++ /dev/null @@ -1,68 +0,0 @@ -/* depend: */ -/* cflags: */ -/* linker: */ - -#include -#include -#include -#include -#include - -/* macros */ - -#define CEIL(x, y) (((x) + (y) - 1) / (y)) -#define MIN(x, y) (((x) < (y)) ? (x) : (y)) -#define MAX(x, y) (((x) > (y)) ? (x) : (y)) -#define VERBOSE(level, statement...) do { if (level <= verbose) { statement; } } while(0) - -/* gobal variables */ - -char *progname = NULL; -int verbose = 0; - -/* help function */ - -void usage (int ret) -{ - FILE *fd = ret ? stderr : stdout; - fprintf (fd, "usage: %s\n", progname); - fprintf (fd, " -h : help message\n"); - fprintf (fd, " -v : verbose level (%d)\n", verbose); - - exit (ret); -} - -/* main function */ - -int main (int argc, char *argv[]) -{ - - progname = argv[0]; - - int c; - while ((c = getopt(argc, argv, "hv:")) != EOF) { - switch (c) { - case 'v': - verbose = atoi (optarg); - break; - case 'h': - default: - usage (c != 'h'); - } - } - if (argc - optind != 0) { - fprintf (stderr, "%s: invalid option -- %s\n", progname, argv[optind]); - usage (1); - } - - printf ("work in progress...\n"); - - return 0; -} - -// test: skel.exe -h -// test: skel.exe -h | awk '/usage:/ { rc=1 } END { exit (1-rc) }' -// test: skel.exe -_ 2> /dev/null | awk 'END { if (NR == 0) { exit(0) } else exit (1) }' -// test: skel.exe -_ 2>&1 | awk '/usage:/ { rc=1 } END { exit (1-rc) }' - -/* vim: set ts=4 sw=4 et */ -- 2.30.2