mirror of https://git.qorg11.net/k9core.git
Improve yes
This commit is contained in:
parent
0670f46ef8
commit
e27abc9c3b
16
src/yes.c
16
src/yes.c
|
@ -1,19 +1,11 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
char a = 'y';
|
if(argc > 1)
|
||||||
|
while(1) puts(argv[1]);
|
||||||
if(argv[1] != NULL)
|
else
|
||||||
{
|
while(1) puts("y");
|
||||||
strcpy(&a,argv[1]);
|
|
||||||
}
|
|
||||||
while(1)
|
|
||||||
{
|
|
||||||
putchar(a);
|
|
||||||
putchar('\n');
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue