IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30199


Ignore:
Timestamp:
Jan 2, 2011, 9:37:40 AM (15 years ago)
Author:
eugene
Message:

do not segfault on a syntax error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/Ohana/src/opihi/lib.shell/command.c

    r30115 r30199  
    1313  if (!line) { fprintf (stderr, "programming error\n"); abort(); }
    1414
    15   rawline = strcreate (line);
     15  rawline = strcreate (line);  // used for error messages which should echo the unparsed line
    1616
    1717  /* force a space between ! and first word: !ls becomes ! ls */
     
    9090
    9191  FREE (rawline);
     92
     93  if (VERBOSE_SHELL != OPIHI_VERBOSE_OFF) gprint (GP_ERR, "error on line: %s\n", rawline);
     94
     95  // return the current value of line, in case it was modified
     96  *outline = line;
    9297  return FALSE;
    9398}
Note: See TracChangeset for help on using the changeset viewer.