IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 31, 2007, 4:40:05 PM (19 years ago)
Author:
jhoblitt
Message:

required option update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/regtool.c

    r12347 r13580  
    2323
    2424#include <stdlib.h>
     25#include <stdint.h>
     26#include <math.h>
    2527
    2628#include "pxtools.h"
     
    422424
    423425    bool status = false;
    424     psS8 code = psMetadataLookupS8(&status, config->args, "-code");
     426    psS16 code = psMetadataLookupS16(&status, config->args, "-code");
    425427    if (!status) {
    426428        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -code");
     429        return false;
     430    }
     431    if (code == INT16_MAX) {
     432        psError(PS_ERR_UNKNOWN, true, "-code is required");
    427433        return false;
    428434    }
     
    753759{
    754760    bool status = false;
    755     psS8 code = psMetadataLookupS8(&status, config->args, "-code");
     761    psS16 code = psMetadataLookupS16(&status, config->args, "-code");
    756762    if (!status) {
    757763        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -code");
     764        return false;
     765    }
     766    if (code == INT16_MAX) {
     767        psError(PS_ERR_UNKNOWN, true, "-code is required");
    758768        return false;
    759769    }
     
    946956
    947957    // default
    948     psS8 code = psMetadataLookupS8(&status, config->args, "-code");
     958    psS16 code = psMetadataLookupS16(&status, config->args, "-code");
    949959    if (!status) {
    950960        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -code");
     
    10991109    }
    11001110
    1101     psS8 code = psMetadataLookupS8(&status, config->args, "-code");
     1111    psS16 code = psMetadataLookupS16(&status, config->args, "-code");
    11021112    if (!status) {
    11031113        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -code");
Note: See TracChangeset for help on using the changeset viewer.