irungentoo/ProjectTox-Core — pull request #401 by lukechampine (2013-08-08 19:33:23+00:00)
Title: make toxic handle input in a more sane manner

toxic currently handles input with a giant if-else block in ```execute()```. It also uses pointer arithmetic to parse command arguments. This change refactors ```execute()``` to iterate through an array of commands instead of using if-elses, and parse arguments with ```strtok()``` instead of using ```strchr()``` and pointer arithmetic. Each command now has a corresponding function that takes the window and an array of ```char *```s. This results in more readable code, and makes it easier to handle command arguments.

(note: diff really dropped the ball on this one. You're probably better off just viewing the file.)