IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30580


Ignore:
Timestamp:
Feb 11, 2011, 3:07:40 PM (15 years ago)
Author:
eugene
Message:

handle error in where expressions

Location:
branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/avextract.c

    r28241 r30580  
    4444
    4545  // parse skyregion options
    46   if ((selection = SetRegionSelection (&argc, argv)) == NULL) goto escape;
     46  if ((selection = SetRegionSelection (&argc, argv)) == NULL) {
     47    print_error();
     48    goto escape;
     49  }
    4750
    4851  // command-line is of the form: avextract field,field, field [where (field op value)...]
     
    6871  // construct the db Boolean math stack (frees cstack)
    6972  stack = dbRPN (Ncstack, cstack, &Nstack);
     73  if (Ncstack && !Nstack) {
     74    print_error();
     75    goto escape;
     76  }
    7077
    7178  // add the skyregion limits to the where statement (or create)
  • branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/imextract.c

    r28958 r30580  
    6262  // construct the db Boolean math stack (frees cstack)
    6363  stack = dbRPN (Ncstack, cstack, &Nstack);
     64  if (Ncstack && !Nstack) {
     65    print_error();
     66    goto escape;
     67  }
    6468
    6569  // add the skyregion limits to the where statement (or create)
  • branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/mextract.c

    r28955 r30580  
    6868  // construct the db Boolean math stack (frees cstack)
    6969  stack = dbRPN (Ncstack, cstack, &Nstack);
    70   if ((Ncstack > 0) && (Nstack < 1)) {
     70  if (Ncstack && !Nstack) {
    7171    print_error ();
    7272    goto escape;
  • branches/eam_branches/ipp-20101205/Ohana/src/opihi/dvo/mmextract.c

    r28241 r30580  
    106106  // construct the db Boolean math stack (frees cstack)
    107107  stack1 = dbRPN (Ncstack1, cstack1, &Nstack1);
    108   if ((Ncstack1 > 0) && (Nstack1 < 1)) {
     108  if (Ncstack1 && !Nstack1) {
    109109    print_error ();
    110110    goto escape;
     
    113113  // construct the db Boolean math stack (frees cstack)
    114114  stack2 = dbRPN (Ncstack2, cstack2, &Nstack2);
    115   if ((Ncstack2 > 0) && (Nstack2 < 1)) {
     115  if (Ncstack2 && !Nstack2) {
    116116    print_error ();
    117117    goto escape;
Note: See TracChangeset for help on using the changeset viewer.