Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* See LICENSE file for copyright and license details. */
- #include <stdio.h>
- #include "util.h"
- #define BUFSIZE 1024
- static void
- usage(void)
- {
- eprintf("usage: %s [string ...]\n", argv0);
- }
- int
- main(int argc, char *argv[])
- {
- char **p;
- ARGBEGIN {
- default:
- usage();
- } ARGEND
- p = argv;
- char *buf = malloc(BUFSIZE);
- int bufu = 0;
- while (bufu < BUFSIZE) {
- memcpy(buf+bufu, *p ? *p : "y\n", 2);
- bufu += 2;
- }
- while(write(1, buf, BUFSIZE));
- return 1; /* not reached */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement