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/spline_commands.c

    r41164 r41340  
    2828  if (xvec->Nelements != yvec->Nelements) {
    2929    gprint (GP_ERR, "x and y vectors must be the same length\n");
    30     return FALSE;
    31   }
    32 
    33   if (xvec->Nelements < 3) {
    34     gprint (GP_ERR, "cannot make a spline with fewer than 3 knots\n");
    3530    return FALSE;
    3631  }
     
    9893}
    9994
    100 int spline_print (int argc, char **argv) {
    101 
    102   int i;
    103 
    104   if (argc != 2) {
    105     gprint (GP_ERR, "USAGE: spline print (name)\n");
    106     return FALSE;
    107   }
    108 
    109   Spline *myspline = FindSpline (argv[1]);
    110   if (!myspline) {
    111     gprint (GP_ERR, "spline %s not found\n", argv[1]);
    112     return (FALSE);
    113   }
    114 
    115   for (i = 0; i < myspline->Nknots; i++) {
    116     gprint (GP_LOG, "%lf : %lf : %lf\n", myspline->xk[i], myspline->yk[i], myspline->y2[i]);
    117   }   
    118 
    119   return TRUE;
    120 }
    121 
    12295int spline_load (int argc, char **argv) {
    12396
     
    136109int spline_delete (int argc, char **argv) {
    137110
    138   int N, status;
    139 
    140   int QUIET = FALSE;
    141   if ((N = get_argument (argc, argv, "-q"))) {
    142     QUIET = TRUE;
    143     remove_argument (N, &argc, argv);
    144   }
     111  int status;
     112  Spline *spline;
    145113
    146114  if (argc != 2) {
     
    149117  }
    150118
    151   Spline *spline = FindSpline (argv[1]);
     119  spline = FindSpline (argv[1]);
    152120  if (spline == NULL) {
    153     if (QUIET) return TRUE;
    154121    gprint (GP_ERR, "spline %s not found\n", argv[1]);
    155122    return FALSE;
     
    163130int spline_rename (int argc, char **argv) {
    164131
     132  Spline *spline;
     133
    165134  if (argc != 3) {
    166135    gprint (GP_ERR, "USAGE: spline rename (spline) (newname)\n");
     
    168137  }
    169138
    170   Spline *spline = FindSpline (argv[1]);
     139  spline = FindSpline (argv[1]);
    171140  if (spline == NULL) {
    172141    gprint (GP_ERR, "spline %s not found\n", argv[1]);
    173142    return FALSE;
    174   }
    175 
    176   Spline *newname = FindSpline (argv[2]);
    177   if (newname != NULL) {
    178     DeleteSpline (newname);
    179143  }
    180144
     
    183147  return TRUE;
    184148}
     149
     150/*
     151int spline_listspline (int argc, char **argv) {
     152
     153  Spline *spline;
     154
     155  if (argc != 2) {
     156    gprint (GP_ERR, "USAGE: spline listspline (spline)\n");
     157    return FALSE;
     158  }
     159
     160  spline = FindSpline (argv[1]);
     161  if (spline == NULL) {
     162    gprint (GP_ERR, "spline %s not found\n", argv[1]);
     163    return FALSE;
     164  }
     165
     166  ListPages (spline);
     167  return TRUE;
     168}
     169*/
     170
Note: See TracChangeset for help on using the changeset viewer.