2011-05-23 02:36:34 +01:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2014-11-13 18:29:30 +01:00
|
|
|
|
2011-06-10 02:56:13 +01:00
|
|
|
#include "util.h"
|
2011-05-23 02:36:34 +01:00
|
|
|
|
2013-06-14 20:20:47 +02:00
|
|
|
static void
|
|
|
|
usage(void)
|
|
|
|
{
|
|
|
|
eprintf("usage: %s [-n] text\n", argv0);
|
|
|
|
}
|
|
|
|
|
2011-05-23 02:36:34 +01:00
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
2014-11-13 21:24:47 +01:00
|
|
|
int nflag = 0;
|
2011-05-23 02:36:34 +01:00
|
|
|
|
2013-06-14 20:20:47 +02:00
|
|
|
ARGBEGIN {
|
|
|
|
case 'n':
|
2014-11-13 21:24:47 +01:00
|
|
|
nflag = 1;
|
2013-06-14 20:20:47 +02:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
usage();
|
|
|
|
} ARGEND;
|
|
|
|
|
2014-11-13 18:29:30 +01:00
|
|
|
for (; argc > 0; argc--, argv++)
|
2013-06-14 20:20:47 +02:00
|
|
|
putword(argv[0]);
|
2014-11-13 18:29:30 +01:00
|
|
|
if (!nflag)
|
2011-05-26 04:01:20 +01:00
|
|
|
putchar('\n');
|
2013-06-14 20:20:47 +02:00
|
|
|
|
2014-10-02 23:46:04 +01:00
|
|
|
return 0;
|
2011-05-23 02:36:34 +01:00
|
|
|
}
|