IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 6, 2005, 2:37:31 PM (21 years ago)
Author:
eugene
Message:

added -cpt options to dvo extraction functions

File:
1 edited

Legend:

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

    r4462 r4470  
    55
    66  int i, status, argc;
    7   char **argv;
     7  char **argv, **targv;
    88  Command *cmd;
    99
     
    2929  if (argc == 0) return (TRUE);  /* empty command or assignment */
    3030
     31  /* save the original values of argv since command may modify the array */
     32  ALLOCATE (targv, char *, argc);
     33  for (i = 0; i < argc; i++) targv[i] = argv[i];
     34
    3135  cmd = MatchCommand (argv[0], TRUE, FALSE);
    3236  if (cmd == NULL) {
     
    3539    free (argv[0]);
    3640    argv[0] = strcreate (cmd[0].name);
     41    targv[0] = argv[0];
    3742    status = (*cmd[0].func) (argc, argv);
    3843  }
    39   for (i = 0; i < argc; i++) free (argv[i]);
     44  for (i = 0; i < argc; i++) free (targv[i]);
     45  free (targv);
    4046  free (argv);
    4147
Note: See TracChangeset for help on using the changeset viewer.