Re: [hackers] [sbase][PATCH] Minor optimizations for 'yes'
What about this?
#include <stdio.h>
int main(int argc, const char **argv) {
int i;
const char *fallback[] = { "y", NULL };
argv = argc <= 1 ? fallback : argv + 1;
for (;;) {
for (i = 0; argv[i]; ++i) {
if (i)
fputc(',', stdout);
fputs(argv[i], stdout);
}
fputc('\n', stdout);
}
return 1;
}
Received on Fri Jun 28 2019 - 09:48:25 CEST
This archive was generated by hypermail 2.3.0
: Fri Jun 28 2019 - 12:48:27 CEST