diff options
author | Ben Burwell <ben@benburwell.com> | 2015-04-01 20:22:48 -0400 |
---|---|---|
committer | Ben Burwell <ben@benburwell.com> | 2015-04-01 20:22:48 -0400 |
commit | e781fb26fdd422ea72c3a0eeba817e4faa5f663b (patch) | |
tree | 7f73aa21426320dc13d74c1dde1e591ef97fb44a /comhan.c | |
parent | e468dc911189e71509012fb0ed228cc765f641fa (diff) |
as of 2013-10-172013-10-17
Diffstat (limited to 'comhan.c')
-rw-r--r-- | comhan.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -46,10 +46,10 @@ char *aliases[] = {" ", " ", " ", " ", */
void comhan() {
- char *args[5];
+ static char *args[7]; //one more than expected number of arguments
int argc;
int cmd_num;
- char buffer[BUF_SIZE];
+ static char buffer[BUF_SIZE];
int do_stop = 0;
do {
@@ -102,7 +102,7 @@ int get_cmd(char cmd[]){ int set_args(char buffer[], char *args[]) {
/* use string tok to set the contents of args from buffer
and return the number of args (will go into argc) */
- char separators[4] = " =/"; //Characters that separate tokens
+ char separators[5] = " =/,"; //Characters that separate tokens
int i = 0; //loop control
args[i] = strtok(buffer, separators); //Get first token
@@ -178,7 +178,6 @@ int cmd_stop(){ printf("**COMHAN execution complete **\n");
return 1;
} else {
- printf("Okay! \n");
return 0;
}
}
@@ -413,7 +412,8 @@ void cmd_allocate(char *args[]) { return;
}
- result = build_pcb(new, args[1], type, state, suspend, priority);
+ result = build_pcb(new, args[1], type, state, suspend, priority,
+ NULL, NULL, NULL, NULL);
switch (result) {
case 1: break;
|