IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 16, 2007, 2:27:00 PM (19 years ago)
Author:
eugene
Message:

fixed cases of hard-wired line length; some api cleanup in stack_math

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.shell/parse_commands.c

    r2598 r15878  
    44char **parse_commands (char *line, int *argc) {
    55
    6   int i, j, NARG;
     6  int i, NARG;
    77  char *c;
    88  char **argv;
     
    2121  for (i = 1; c != (char *) NULL; i++) {
    2222    argv[i] = thisword (c);
    23     if (argv[i] == (char *) NULL) {
    24       for (j = 0; j < i; j++)
    25         free (argv[i]);
    26       free (argv);
    27       *argc = 0;
    28       return (argv);
    29     }
     23
     24    /* if one of the words does not parse (eg, ""), skip it */
     25    if (argv[i] == NULL) i--;
     26
    3027    c = nextword (c);
    3128    if (i == NARG - 1) {
     
    4946
    5047
     48
     49/* old code:
     50      for (j = 0; j < i; j++)
     51        free (argv[i]);
     52      free (argv);
     53      *argc = 0;
     54      return (argv);
     55    }
     56*/
Note: See TracChangeset for help on using the changeset viewer.