char commandCount = 0;
int commandCount = 0;
void debuggerMain(){  char buffer[1024];  char *commands[10];  char commandCount = 0;    emuUpdateCPSR();  debuggerRegisters(0, NULL);    while(debugger) {    systemSoundPause();    printf("debugger> ");    commandCount = 0;    char *s = fgets(buffer, 1024, stdin);    commands[0] = strtok(s, " \t\n");    if(commands[0] == NULL)      continue;    commandCount++;    while((s = strtok(NULL, " \t\n"))) {      commands[commandCount++] = s;      if(commandCount == 10)        break;    }    for(int j = 0; ; j++) {      if(debuggerCommands[j].name == NULL) {        printf("Unrecognized command %s. Type h for help.\n", commands[0]);        break;      }      if(!strcmp(commands[0], debuggerCommands[j].name)) {        debuggerCommands[j].function(commandCount, commands);        break;      }    }   }}