view src/prog/echo.c @ 124:56447a5e2d2f

Added strtok function, should function just as the C stdlib version does
author Jonathan Pevarnek <pevarnj@gmail.com>
date Thu, 23 Jun 2011 10:51:55 -0400
parents 4473e746fe5a
children de391a7d85b1
line wrap: on
line source

#include <prog/svcCalls.h>
#include <std.h>
#include <string.h>

void start() //TODO: accept a command line argument of what to print
{
	char buffer[128];
	char *b, *c;
	sGet(buffer, 128);
	b = buffer;
	while((c = strtok(b, " ,."))) {
		if(b) b = NULL;
		sPrint(c);
		sPrint("\n");
	}
	exit();
}