Mercurial > hg > toybox
view toys/yes.c @ 154:05d80f4dfdb4
Add .hgignore file
author | Charlie Shepherd <masterdriverz@gentoo.org> |
---|---|
date | Tue, 06 Nov 2007 23:12:03 +0000 |
parents | bb6048c923ec |
children | 25447caf1b4b |
line wrap: on
line source
/* vi: set sw=4 ts=4: */ /* * yes.c - Repeatedly output a string. */ #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; }