示例#1
0
/**
 * Code to handle the refid option.
 * Set the default display format for S2+ refids.
 * @param[in] pOptions the ntpq options data structure
 * @param[in,out] pOptDesc the option descriptor for this option.
 */
static void
doOptRefid(tOptions* pOptions, tOptDesc* pOptDesc)
{

/* extracted from optmain.tlib near line 945 */
    static char const * const names[2] = {
        ntpq_opt_strs+1972, ntpq_opt_strs+1041 };

    if (pOptions <= OPTPROC_EMIT_LIMIT) {
        (void) optionEnumerationVal(pOptions, pOptDesc, names, 2);
        return; /* protect AutoOpts client code from internal callbacks */
    }

    pOptDesc->optArg.argEnum =
        optionEnumerationVal(pOptions, pOptDesc, names, 2);
}
示例#2
0
/**
 * Code to handle the trace option.
 *
 * @param pOptions the xml2ag options data structure
 * @param pOptDesc the option descriptor for this option.
 */
static void
doOptTrace(tOptions* pOptions, tOptDesc* pOptDesc)
{

/* extracted from optmain.tlib near line 834 */
    static char const * const azNames[7] = {
        xml2ag_opt_strs+2995,   xml2ag_opt_strs+3003,   xml2ag_opt_strs+3017,
        xml2ag_opt_strs+3030,   xml2ag_opt_strs+3040,   xml2ag_opt_strs+3053,
        xml2ag_opt_strs+3065 };

    if (pOptions <= OPTPROC_EMIT_LIMIT) {
        (void) optionEnumerationVal(pOptions, pOptDesc, azNames, 7);
        return; /* protect AutoOpts client code from internal callbacks */
    }

    pOptDesc->optArg.argEnum =
        optionEnumerationVal(pOptions, pOptDesc, azNames, 7);

}