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