void cmdCB(OGLCONSOLE_Console console, char *cmd)
{
if (!strncmp(cmd, "quit", 4)) done = TRUE;
else if (!strncmp(cmd, "add", 3))
{
int a, b;
if (sscanf(cmd, "add %i %i", &a, &b) == 2)
{
OGLCONSOLE_Output(console, "%i + %i = %i", a, b, a+b);
return;
}
OGLCONSOLE_Output(console, "usage: add INT INT");
return;
}
OGLCONSOLE_Output(console, "I don't understand this command: %s", cmd);
}