Mercurial > hg > toybox
view toys/yes.c @ 146:99e651512aa4
Get toysh.c to start using the option parsing logic, and some minor cleanup.
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 19 Oct 2007 19:12:48 -0500 |
parents | dfe99495acbc |
children | bb6048c923ec |
line wrap: on
line source
/* vi: set sw=4 ts=4: */ /* * hello.c - A hello world program. */ #include "toys.h" int yes_main(void) { for (;;) { int i; for (i=0; toys.optargs[i]; i++) { if (i) xputc(' '); xprintf("%s", toys.optargs[i]); } if (!i) xputc('y'); xputc('\n'); } return 0; }