Changeset 27255 for trunk/Ohana/src/opihi/lib.shell/command.c
- Timestamp:
- Mar 11, 2010, 12:45:59 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.shell/command.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.shell/command.c
r25440 r27255 1 1 # include "opihi.h" 2 2 # define DEBUG 0 3 4 static int VERBOSE_SHELL = FALSE; 3 5 4 6 int command (char *line, char **outline, int VERBOSE) { … … 29 31 *outline = line; 30 32 31 # if (DEBUG) 32 fprintf (stderr, "line: %s\n", line); 33 # endif 33 if (VERBOSE_SHELL) gprint (GP_ERR, "opihi: %s\n", line); 34 34 35 35 argv = parse_commands (line, &argc); … … 60 60 msg = get_variable_ptr ("ERRORMSG"); 61 61 if (msg != (char *) NULL) gprint (GP_ERR, "%s\n", msg); 62 //gprint (GP_ERR, "error on line: %s\n", rawline);62 if (VERBOSE_SHELL) gprint (GP_ERR, "error on line: %s\n", rawline); 63 63 } 64 64 … … 73 73 } 74 74 75 void set_verbose_shell(int mode) { 76 VERBOSE_SHELL = mode; 77 } 78 79 int get_verbose_shell(void) { 80 return VERBOSE_SHELL; 81 } 82 83 84 75 85 /* parse the input line, search for the corresponding command, and execute it 76 86 if no match is found, return -1; this is used above to distinguish between
Note:
See TracChangeset
for help on using the changeset viewer.
