version 1.52 | | version 1.53 |
---|
| | |
/* | | /* |
* static char *rcsid_commands_c = | | * static char *rcsid_commands_c = |
* "$Id: commands.c,v 1.52 2005/08/11 16:44:30 cavesomething Exp $"; | | * "$Id: commands.c,v 1.53 2005/09/04 16:58:12 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
asp =(CommArray_s *)bsearch((void *)&dummy, | | asp =(CommArray_s *)bsearch((void *)&dummy, |
(void *)Commands, CommandsSize, | | (void *)Commands, CommandsSize, |
sizeof(CommArray_s), compare_A); | | sizeof(CommArray_s), compare_A); |
printf("Getting asp for command string %s\n", cmd); | | LOG(llevDebug, "Getting asp for command string %s\n", cmd); |
if (asp) | | if (asp) |
return asp->func; | | return asp->func; |
else | | else |
{ | | { |
printf("Now we are here\n"); | | LOG(llevDebug, "Now we are here\n"); |
asp =(CommArray_s *)bsearch((void *)&dummy, | | asp =(CommArray_s *)bsearch((void *)&dummy, |
(void *)CommunicationCommands, CommunicationCommandSize, | | (void *)CommunicationCommands, CommunicationCommandSize, |
sizeof(CommArray_s), compare_A); | | sizeof(CommArray_s), compare_A); |
| | |
int i; | | int i; |
/* if it's a keybinding command, ignore semicolons */ | | /* if it's a keybinding command, ignore semicolons */ |
if(strstr(str,"bind")) return parse_string(op,str); | | if(strstr(str,"bind")) return parse_string(op,str); |
printf("parsin command '%s'\n",str); | | LOG(llevDebug, "parsin command '%s'\n", str); |
/* If on a socket, you can not do complex commands. */ | | /* If on a socket, you can not do complex commands. */ |
if(op && (tmp=strchr(str,';'))!=NULL) /* we've found a ';' do the 1st and recurse */ | | if(op && (tmp=strchr(str,';'))!=NULL) /* we've found a ';' do the 1st and recurse */ |
{ | | { |