Changeset 41985 for branches/eam_branches/ipp-20211108
- Timestamp:
- Jan 11, 2022, 4:58:07 PM (5 years ago)
- Location:
- branches/eam_branches/ipp-20211108/Ohana/src/opihi/cmd.basic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20211108/Ohana/src/opihi/cmd.basic/getargs.c
r41978 r41985 53 53 if (!argmatch) { 54 54 if (varName) { 55 // default for a boolean is FALSE 56 // default for a value is to keep an existing value 55 57 if (mode == MODE_BOOL) { 56 58 set_str_variable (varName, "0"); // NOTE: if a local variable with the same name exists, that will be used 57 } else {58 set_str_variable (varName, ""); // NOTE: if a local variable with the same name exists, that will be used59 59 } 60 60 } -
branches/eam_branches/ipp-20211108/Ohana/src/opihi/cmd.basic/list.c
r41341 r41985 119 119 // return an error if -add is given with no other args 120 120 if ((argc > 2) && (!strcmp (argv[2], "-join"))) { 121 int start = 0; 122 if ((N = get_argument (argc, argv, "-start"))) { 123 remove_argument (N, &argc, argv); 124 start = atoi (argv[N]); 125 remove_argument (N, &argc, argv); 126 } 127 121 128 if (argc != 4) { 122 129 gprint (GP_ERR, "USAGE: list (root) -join (variable)\n"); … … 137 144 memset (output, 0, MAX_LINE_LENGTH); 138 145 139 for (i = 0; i < nList; i++) {146 for (i = start; i < nList; i++) { 140 147 snprintf (line, MAX_LINE_LENGTH, "%s:%d", argv[1], i); 141 148 char *word = get_variable (line);
Note:
See TracChangeset
for help on using the changeset viewer.
