Changeset 27790 for trunk/Ohana/src/opihi/lib.shell/command.c
- Timestamp:
- Apr 28, 2010, 10:27:33 AM (16 years ago)
- Location:
- trunk/Ohana
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/opihi/lib.shell/command.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana
-
Property svn:mergeinfo
set to
/branches/eam_branches/Ohana.20100407 merged eligible
-
Property svn:mergeinfo
set to
-
trunk/Ohana/src/opihi/lib.shell/command.c
r27255 r27790 2 2 # define DEBUG 0 3 3 4 static int VERBOSE_SHELL = FALSE;4 static int VERBOSE_SHELL = OPIHI_VERBOSE_OFF; 5 5 6 6 int command (char *line, char **outline, int VERBOSE) { … … 10 10 Command *cmd; 11 11 12 rawline = NULL;13 //rawline = strcreate (line);12 // rawline = NULL; 13 rawline = strcreate (line); 14 14 15 15 /* force a space between ! and first word: !ls becomes ! ls */ … … 24 24 /* expand anything of the form fred[N] */ 25 25 line = expand_vectors (line); /* line is freed here, new one allocated */ 26 27 // print the line with the variables and vectors expanded, but before evaluating 28 // any in-line math expression 29 if (VERBOSE_SHELL == OPIHI_VERBOSE_ON) gprint (GP_ERR, "opihi: %s\n", line); 30 26 31 /* solve math expresions, assign variable, if needed */ 27 32 line = parse (line); /* line is freed here, new one allocated */ … … 31 36 *outline = line; 32 37 33 if (VERBOSE_SHELL) gprint (GP_ERR, "opihi: %s\n", line);34 35 38 argv = parse_commands (line, &argc); 36 39 if (argc == 0) { … … 60 63 msg = get_variable_ptr ("ERRORMSG"); 61 64 if (msg != (char *) NULL) gprint (GP_ERR, "%s\n", msg); 62 if (VERBOSE_SHELL ) gprint (GP_ERR, "error on line: %s\n", rawline);65 if (VERBOSE_SHELL != OPIHI_VERBOSE_OFF) gprint (GP_ERR, "error on line: %s\n", rawline); 63 66 } 64 67
Note:
See TracChangeset
for help on using the changeset viewer.
