summaryrefslogtreecommitdiff
path: root/util/sbase/yes.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/sbase/yes.c')
-rw-r--r--util/sbase/yes.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/util/sbase/yes.c b/util/sbase/yes.c
new file mode 100644
index 00000000..b5c3c109
--- /dev/null
+++ b/util/sbase/yes.c
@@ -0,0 +1,25 @@
+/* See LICENSE file for copyright and license details. */
+#include <stdio.h>
+
+#include "util.h"
+
+static void
+usage(void)
+{
+ eprintf("usage: %s [string]\n", argv0);
+}
+
+int
+main(int argc, char *argv[])
+{
+ const char *s;
+
+ ARGBEGIN {
+ default:
+ usage();
+ } ARGEND
+
+ s = argc ? argv[0] : "y";
+ for (;;)
+ puts(s);
+}