diff options
| author | Miguel <m.i@gmx.at> | 2018-09-21 03:14:52 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-09-21 03:14:52 +0200 |
| commit | d4bc2ecdd1d0b3d3f3642a5f02840d1e0cb5e199 (patch) | |
| tree | 076ecc41b928c057a6c10df6508237961d714958 /userspace/number.c | |
| parent | ace0646608c393d8952b14536090c302bed2ee85 (diff) | |
piper works so nice
Diffstat (limited to 'userspace/number.c')
| -rw-r--r-- | userspace/number.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/userspace/number.c b/userspace/number.c new file mode 100644 index 0000000..b10bccb --- /dev/null +++ b/userspace/number.c @@ -0,0 +1,22 @@ +#include <stdio.h> +#include <stdlib.h> + +int main(int argc, char **argv) +{ + char col_start[]="\033[34;40m"; + char col_end[]="\033[37;40m"; + + FILE *in=stdin; + FILE *out=stdout; + + int i=1; + char buf[256]; + while(NULL!=fgets(buf,255,in)) + { + printf("line %s%i%s: %s",col_start,i,col_end,buf); + //printf("line %i : %s",i,buf); + i++; + } + + return EXIT_SUCCESS; +} |
