IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 16, 2020, 1:54:47 PM (6 years ago)
Author:
tdeboer
Message:

revert to working Ohana build

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.data/create.c

    r41269 r41340  
    77  Vector *vec;
    88 
    9   // create a vector of empty strings
    10   if ((N = get_argument (argc, argv, "-str"))) {
    11     remove_argument (N, &argc, argv);
    12 
    13     char *stringValue = NULL;
    14     if ((N = get_argument (argc, argv, "-value"))) {
    15       remove_argument (N, &argc, argv);
    16       stringValue = strcreate (argv[N]);
    17       remove_argument (N, &argc, argv);
    18     }
    19 
    20     if (argc != 3) {
    21       gprint (GP_ERR, "USAGE: create vector Nelements -value word\n");
    22       return (FALSE);
    23     }
    24 
    25     if ((vec = SelectVector (argv[1], ANYVECTOR, TRUE)) == NULL) return (FALSE);
    26     int Nelements = atoi (argv[2]);
    27 
    28     // a newly reset vector has NULL-valued pointers
    29     ResetVector (vec, OPIHI_STR, Nelements);
    30     for (int i = 0; i < Nelements; i++) {
    31       vec[0].elements.Str[i] = stringValue ? strcreate (stringValue) : strcreate ("");
    32     }
    33     return TRUE;
    34   }
    35 
    369  INT = FALSE;
    3710  if ((N = get_argument (argc, argv, "-int"))) {
     
    4316    gprint (GP_ERR, "USAGE: create vector start end [delta] [-int]\n");
    4417    gprint (GP_ERR, " -int : resulting vector is integer type (delta must be integer)\n");
    45     gprint (GP_ERR, " -str : resulting vector is string type (only give number of elements)\n");
    4618    return (FALSE);
    4719  }
Note: See TracChangeset for help on using the changeset viewer.