view toys/yes.c @ 115:19b5567f0a1b

Add readlink, xreadlink(), and change xrealloc() to not fight the stupid compiler so much.
author Rob Landley <rob@landley.net>
date Sun, 29 Apr 2007 19:55:21 -0400
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;
}