Changeset 42081 for trunk/Ohana/src/opihi/cmd.basic/list.c
- Timestamp:
- Feb 28, 2022, 12:15:17 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/cmd.basic/list.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/cmd.basic/list.c
r41341 r42081 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.
