morpheus-base

morpheus base system
git clone git://git.2f30.org/morpheus-base
Log | Files | Refs

yes.c (348B)


      1 /* See LICENSE file for copyright and license details. */
      2 #include <stdio.h>
      3 #include <stdlib.h>
      4 
      5 #include "util.h"
      6 
      7 static void
      8 usage(void)
      9 {
     10 	eprintf("usage: %s [string]\n", argv0);
     11 }
     12 
     13 int
     14 main(int argc, char *argv[])
     15 {
     16 	ARGBEGIN {
     17 	default:
     18 		usage();
     19 	} ARGEND;
     20 
     21 	for (;;)
     22 		puts(argc >= 1 ? argv[0] : "y");
     23 	return 1; /* should not reach */
     24 }