Home
last modified time | relevance | path

Searched refs:pOD (Results 1 – 15 of 15) sorted by relevance

/freebsd/contrib/ntp/sntp/libopts/
H A Dputshell.c258 print_enumeration(tOptions * pOpts, tOptDesc * pOD) in print_enumeration() argument
260 uintptr_t e_val = pOD->optArg.argEnum; in print_enumeration()
261 printf(OPT_VAL_FMT, pOpts->pzPROGNAME, pOD->pz_NAME); in print_enumeration()
266 (*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, pOD); in print_enumeration()
267 printf(QUOT_ARG_FMT, pOD->optArg.argString); in print_enumeration()
268 if (pOD->fOptState & OPTST_ALLOC_ARG) in print_enumeration()
269 AGFREE(pOD->optArg.argString); in print_enumeration()
270 pOD->optArg.argEnum = e_val; in print_enumeration()
272 printf(OPT_END_FMT, pOpts->pzPROGNAME, pOD->pz_NAME); in print_enumeration()
276 print_membership(tOptions * pOpts, tOptDesc * pOD) in print_membership() argument
[all …]
H A Dfile.c41 check_existence(teOptFileType ftype, tOptions * pOpts, tOptDesc * pOD) in check_existence() argument
43 char const * fname = pOD->optArg.argString; in check_existence()
102 open_file_fd(tOptions * pOpts, tOptDesc * pOD, tuFileMode mode) in open_file_fd() argument
104 int fd = open(pOD->optArg.argString, mode.file_flags); in open_file_fd()
106 fserr_exit(pOpts->pzProgName, "open", pOD->optArg.argString); in open_file_fd()
109 if ((pOD->fOptState & OPTST_ALLOC_ARG) != 0) in open_file_fd()
110 pOD->optCookie = VOIDP(pOD->optArg.argString); in open_file_fd()
112 AGDUPSTR(pOD->optCookie, pOD->optArg.argString, "file name"); in open_file_fd()
114 pOD->optArg.argFd = fd; in open_file_fd()
115 pOD->fOptState &= ~OPTST_ALLOC_ARG; in open_file_fd()
[all …]
H A Dreset.c33 optionReset(tOptions * pOpts, tOptDesc * pOD) in optionReset() argument
35 pOD->fOptState &= OPTST_PERSISTENT_MASK; in optionReset()
36 pOD->fOptState |= OPTST_RESET; in optionReset()
37 if (pOD->pOptProc != NULL) in optionReset()
38 pOD->pOptProc(pOpts, pOD); in optionReset()
39 pOD->optArg.argString = in optionReset()
40 pOpts->originalOptArgArray[ pOD->optIndex ].argString; in optionReset()
41 pOD->optCookie = pOpts->originalOptArgCookie[ pOD->optIndex ]; in optionReset()
42 pOD->fOptState &= OPTST_PERSISTENT_MASK; in optionReset()
49 tOptDesc * pOD = pOpts->pOptDesc; in optionResetEverything() local
[all …]
H A Dcheck.c72 occurs_enough(tOptions * pOpts, tOptDesc * pOD) in occurs_enough() argument
80 if (pOD->optOccCt >= pOD->optMinCt) in occurs_enough()
87 if ( (pOD->fOptState & OPTST_MUST_SET) in occurs_enough()
88 && (pOD->fOptState & (OPTST_PRESET | OPTST_SET)) ) in occurs_enough()
91 if (pOD->optMinCt > 1) in occurs_enough()
92 fprintf(stderr, zneed_more, pOpts->pzProgName, pOD->pz_Name, in occurs_enough()
93 pOD->optMinCt); in occurs_enough()
94 else fprintf(stderr, zneed_one, pOpts->pzProgName, pOD->pz_Name); in occurs_enough()
106 tOptDesc * pOD = pOpts->pOptDesc; in is_consistent() local
119 if (SELECTED_OPT(pOD)) { in is_consistent()
[all …]
H A Dfind.c75 tOptDesc * pOD = opts->pOptDesc; in opt_ambiguities() local
80 if (pOD->pz_Name == NULL) in opt_ambiguities()
83 if (strneqvcmp(name, pOD->pz_Name, nm_len) == 0) in opt_ambiguities()
84 fprintf(stderr, zambig_file, hyph, pOD->pz_Name); in opt_ambiguities()
86 else if ( (pOD->pz_DisableName != NULL) in opt_ambiguities()
87 && (strneqvcmp(name, pOD->pz_DisableName, nm_len) == 0) in opt_ambiguities()
89 fprintf(stderr, zambig_file, hyph, pOD->pz_DisableName); in opt_ambiguities()
90 } while (pOD++, (++idx < opts->optCt)); in opt_ambiguities()
110 tOptDesc * pOD = opts->pOptDesc; in opt_match_ct() local
116 if (pOD->pz_Name == NULL) in opt_match_ct()
[all …]
H A Denv.c119 os->flags = OPTST_PRESET | OPTST_ALLOC_ARG | os->pOD->fOptState; in do_env_opt()
122 if ( (os->pOD->pz_DisablePfx != NULL) in do_env_opt()
123 && (streqvcmp(os->pzOptArg, os->pOD->pz_DisablePfx) == 0)) { in do_env_opt()
157 if (OPTST_GET_ARGTYPE(os->pOD->fOptState) == OPARG_TYPE_NONE) { in do_env_opt()
168 if ((os->pOD->fOptState & OPTST_ARG_OPTIONAL) == 0) in do_env_opt()
203 st.pOD = pOpts->pOptDesc; in env_presets()
209 for (;ct-- > 0; st.pOD++) { in env_presets()
215 if ( ((st.pOD->fOptState & OPTST_NO_INIT) != 0) in env_presets()
216 || (st.pOD->optEquivIndex != NO_EQUIVALENT) ) in env_presets()
223 nln = strlen(st.pOD->pz_NAME) + 1; in env_presets()
[all …]
H A Denum.c37 enum_err(tOptions * pOpts, tOptDesc * pOD, in enum_err() argument
50 pOD->optArg.argString, pOD->pz_Name); in enum_err()
52 fprintf(option_usage_fp, zValidKeys, pOD->pz_Name); in enum_err()
141 if (OPTST_GET_ARGTYPE(pOD->fOptState) == OPARG_TYPE_MEMBERSHIP) { in enum_err()
160 find_name(char const * name, tOptions * pOpts, tOptDesc * pOD, in find_name() argument
178 enum_err(pOpts, pOD, paz_names, (int)name_ct); in find_name()
212 enum_err(pOpts, pOD, paz_names, (int)name_ct); in find_name()
230 optionKeywordName(tOptDesc * pOD, unsigned int enum_val) in optionKeywordName() argument
235 (*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, &od ); in optionKeywordName()
259 optionEnumerationVal(tOptions * pOpts, tOptDesc * pOD, in optionEnumerationVal() argument
[all …]
H A Drestore.c44 tOptDesc * pOD = pOpts->pOptDesc; in fixupSavedOptionArgs() local
51 for (; ct-- > 0; pOD++) { in fixupSavedOptionArgs()
52 switch (OPTST_GET_ARGTYPE(pOD->fOptState)) { in fixupSavedOptionArgs()
54 if (pOD->fOptState & OPTST_STACKED) { in fixupSavedOptionArgs()
55 tOptDesc * q = p->pOptDesc + (pOD - pOpts->pOptDesc); in fixupSavedOptionArgs()
58 if (pOD->fOptState & OPTST_ALLOC_ARG) { in fixupSavedOptionArgs()
59 tOptDesc * q = p->pOptDesc + (pOD - pOpts->pOptDesc); in fixupSavedOptionArgs()
60 AGDUPSTR(q->optArg.argString, pOD->optArg.argString, "arg"); in fixupSavedOptionArgs()
66 tOptDesc * q = p->pOptDesc + (pOD - pOpts->pOptDesc); in fixupSavedOptionArgs()
H A Dproto.h44 occurs_enough(tOptions * pOpts, tOptDesc * pOD);
114 enum_err(tOptions * pOpts, tOptDesc * pOD,
118 find_name(char const * name, tOptions * pOpts, tOptDesc * pOD,
122 set_memb_shell(tOptions * pOpts, tOptDesc * pOD, char const * const * paz_names,
153 check_existence(teOptFileType ftype, tOptions * pOpts, tOptDesc * pOD);
156 open_file_fd(tOptions * pOpts, tOptDesc * pOD, tuFileMode mode);
159 fopen_file_fp(tOptions * pOpts, tOptDesc * pOD, tuFileMode mode);
423 print_enumeration(tOptions * pOpts, tOptDesc * pOD);
426 print_membership(tOptions * pOpts, tOptDesc * pOD);
429 print_stacked_arg(tOptions * pOpts, tOptDesc * pOD);
[all …]
H A Dnumeric.c45 optionShowRange(tOptions * pOpts, tOptDesc * pOD, void * rng_table, int rng_ct) in optionShowRange() argument
61 pOD->pz_Name, pOD->optArg.argInt); in optionShowRange()
65 if (pOD->fOptState & OPTST_SCALED_NUM) in optionShowRange()
H A Dsort.c129 if (OPTST_GET_ARGTYPE(pOS->pOD->fOptState) == OPARG_TYPE_NONE) { in short_opt_ck()
132 } else if (pOS->pOD->fOptState & OPTST_ARG_OPTIONAL) { in short_opt_ck()
270 if (OPTST_GET_ARGTYPE(os.pOD->fOptState) == OPARG_TYPE_NONE) { in optionSort()
283 } else if (os.pOD->fOptState & OPTST_ARG_OPTIONAL) { in optionSort()
H A Dautoopts.c108 tOptDesc * od = o_st->pOD; in handle_opt()
224 && ((o_st->pOD->fOptState & OPTST_NO_COMMAND) != 0)) { in next_opt()
225 fprintf(stderr, zNotCmdOpt, o_st->pOD->pz_Name); in next_opt()
261 opt_st.pOD->optOccCt--; /* don't count this repetition */ in regular_opts()
H A Dload.c503 if (OPTST_GET_ARGTYPE(opt_state->pOD->fOptState) == OPARG_TYPE_NONE) { in load_opt_line()
508 } else if (opt_state->pOD->fOptState & OPTST_ARG_OPTIONAL) { in load_opt_line()
H A Dautoopts.h221 tOptDesc * pOD; member
/freebsd/contrib/ntp/libntp/
H A Dntp_libopts.c49 tOptDesc * pOD in ntpOptionPrintVersion() argument
53 UNUSED_ARG(pOD); in ntpOptionPrintVersion()