+++ /dev/null
-/* depend: */
-/* cflags: */
-/* linker: */
-
-#include <assert.h>
-#include <getopt.h>
-#include <malloc.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-/* 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: */