Skip to content

Instantly share code, notes, and snippets.

@Ravenslofty
Last active May 20, 2018 14:04
Show Gist options
  • Select an option

  • Save Ravenslofty/42fbd724d192832a71025b03d16fa239 to your computer and use it in GitHub Desktop.

Select an option

Save Ravenslofty/42fbd724d192832a71025b03d16fa239 to your computer and use it in GitHub Desktop.
-int readcmd(usbdevice* kb, const char* line){
+int readcmd(usbdevice* kb, const char* line)
+{
char* word = malloc(strlen(line) + 1);
int wordlen;
const char* newline = 0;
- const devcmd* vt = kb->vtable;
+ const devcmd* vt = kb->vtable;
usbprofile* profile = kb->profile;
- usbmode* mode = 0;
- int notifynumber = 0;
+ usbmode* mode = 0;
+ int notifynumber = 0;
// Read words from the input
cmd command = NONE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment