sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

yes.c (313B)


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