mirror of
git://git.suckless.org/sbase
synced 2024-12-25 08:22:44 +00:00
37 lines
473 B
C
37 lines
473 B
C
/* See LICENSE file for copyright and license details. */
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include "util.h"
|
|
|
|
static void usage(void);
|
|
|
|
int
|
|
main(int argc, char *argv[])
|
|
{
|
|
char *s = "y";
|
|
|
|
ARGBEGIN {
|
|
default:
|
|
usage();
|
|
} ARGEND;
|
|
|
|
switch(argc) {
|
|
case 1:
|
|
s = argv[0];
|
|
/* fallthrough */
|
|
case 0:
|
|
for(;;)
|
|
puts(s);
|
|
break;
|
|
default:
|
|
usage();
|
|
}
|
|
return EXIT_FAILURE; /* should not reach */
|
|
}
|
|
|
|
void
|
|
usage(void)
|
|
{
|
|
eprintf("usage: %s [string]\n", argv0);
|
|
}
|