19 #ifndef OPENOCD_HELPER_JIM_NVP_H
20 #define OPENOCD_HELPER_JIM_NVP_H
66 const struct jim_nvp *nvp_table,
75 const struct jim_nvp *nvp_table,
79 const struct jim_nvp *nvp_table,
85 const struct jim_nvp *nvp_table,
89 const struct jim_nvp *nvp_table,
93 const struct jim_nvp *nvp_table,
100 Jim_Obj *param_value,
101 const struct jim_nvp *nvp_table);
201 Jim_Obj *
const *argv);
int jim_nvp_value2name(Jim_Interp *interp, const struct jim_nvp *nvp_table, int value, struct jim_nvp **result)
void jim_getopt_nvp_unknown(struct jim_getopt_info *goi, const struct jim_nvp *lookup, int hadprefix)
Create an appropriate error message for an NVP.
int jim_nvp_value2name_obj(Jim_Interp *interp, const struct jim_nvp *nvp_table, Jim_Obj *value_obj, struct jim_nvp **result)
int jim_nvp_name2value_obj_nocase(Jim_Interp *interp, const struct jim_nvp *nvp_table, Jim_Obj *name_obj, struct jim_nvp **result)
void jim_set_result_nvp_unknown(Jim_Interp *interp, Jim_Obj *param_name, Jim_Obj *param_value, const struct jim_nvp *nvp_table)
prints a nice 'unknown' parameter error message to the 'result'
struct jim_nvp * jim_nvp_name2value_simple(const struct jim_nvp *nvp_table, const char *name)
int jim_getopt_wide(struct jim_getopt_info *goi, jim_wide *puthere)
Remove argv[0] as wide.
void jim_getopt_debug(struct jim_getopt_info *goi)
Debug - Dump parameters to stderr.
int jim_get_nvp(Jim_Interp *interp, Jim_Obj *objptr, const struct jim_nvp *nvp_table, const struct jim_nvp **result)
int jim_getopt_string(struct jim_getopt_info *goi, const char **puthere, int *len)
Remove argv[0] as string.
int jim_getopt_enum(struct jim_getopt_info *goi, const char *const *lookup, int *puthere)
Remove argv[0] as Enum.
int jim_getopt_setup(struct jim_getopt_info *goi, Jim_Interp *interp, int argc, Jim_Obj *const *argv)
GetOpt - how to.
int jim_nvp_name2value(Jim_Interp *interp, const struct jim_nvp *nvp_table, const char *name, struct jim_nvp **result)
int jim_getopt_nvp(struct jim_getopt_info *goi, const struct jim_nvp *lookup, struct jim_nvp **puthere)
Remove argv[0] as NVP.
int jim_getopt_obj(struct jim_getopt_info *goi, Jim_Obj **puthere)
Remove argv[0] from the list.
const char * jim_debug_argv_string(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
Debug: convert argc/argv into a printable string for printf() debug.
int jim_nvp_name2value_obj(Jim_Interp *interp, const struct jim_nvp *nvp_table, Jim_Obj *name_obj, struct jim_nvp **result)
int jim_nvp_name2value_nocase(Jim_Interp *interp, const struct jim_nvp *nvp_table, const char *name, struct jim_nvp **result)
struct jim_nvp * jim_nvp_name2value_nocase_simple(const struct jim_nvp *nvp_table, const char *name)
int jim_getopt_double(struct jim_getopt_info *goi, double *puthere)
Remove argv[0] as double.
struct jim_nvp * jim_nvp_value2name_simple(const struct jim_nvp *nvp_table, int v)
A TCL -ish GetOpt like code.
Name Value Pairs, aka: NVP.