Mercurial > sos > sos
view src/prog/echo.c @ 160:3d891b634acb default tip
Fix to make make work
author | Jonathan Pevarnek <pevarnj@gmail.com> |
---|---|
date | Fri, 25 Nov 2011 23:27:09 -0500 |
parents | 86ec817aa4f4 |
children |
line wrap: on
line source
#include <prog/svcCalls.h> #include <std.h> #include <string.h> void start(int argc, char** argv) { if(argc) { int i; for(i = 0; i < argc; i++) { sPrint(*argv++); sPrint("\n"); } } else { char buffer[128]; char *b, *c, *track; sGet(buffer, 128); b = buffer; while((c = strtok_r(b, " ,.", &track))) { if(b) b = NULL; sPrint(c); sPrint("\n"); } } exit(); }