Commit c493543f authored by zwelch's avatar zwelch
Browse files

- Replace '){' with ') {'.


git-svn-id: svn://svn.berlios.de/openocd/trunk@2378 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent dc575dc5
...@@ -273,7 +273,7 @@ static int str7x_erase(struct flash_bank_s *bank, int first, int last) ...@@ -273,7 +273,7 @@ static int str7x_erase(struct flash_bank_s *bank, int first, int last)
cmd = FLASH_SER | FLASH_WMS; cmd = FLASH_SER | FLASH_WMS;
target_write_u32(target, str7x_get_flash_adr(bank, FLASH_CR0), cmd); target_write_u32(target, str7x_get_flash_adr(bank, FLASH_CR0), cmd);
while (((retval = str7x_status(bank)) & str7x_info->busy_bits)){ while (((retval = str7x_status(bank)) & str7x_info->busy_bits)) {
alive_sleep(1); alive_sleep(1);
} }
...@@ -329,7 +329,7 @@ static int str7x_protect(struct flash_bank_s *bank, int set, int first, int last ...@@ -329,7 +329,7 @@ static int str7x_protect(struct flash_bank_s *bank, int set, int first, int last
cmd = FLASH_SPR | FLASH_WMS; cmd = FLASH_SPR | FLASH_WMS;
target_write_u32(target, str7x_get_flash_adr(bank, FLASH_CR0), cmd); target_write_u32(target, str7x_get_flash_adr(bank, FLASH_CR0), cmd);
while (((retval = str7x_status(bank)) & str7x_info->busy_bits)){ while (((retval = str7x_status(bank)) & str7x_info->busy_bits)) {
alive_sleep(1); alive_sleep(1);
} }
......
...@@ -101,7 +101,7 @@ static int str9xpec_register_commands(struct command_context_s *cmd_ctx) ...@@ -101,7 +101,7 @@ static int str9xpec_register_commands(struct command_context_s *cmd_ctx)
int str9xpec_set_instr(jtag_tap_t *tap, uint32_t new_instr, tap_state_t end_state) int str9xpec_set_instr(jtag_tap_t *tap, uint32_t new_instr, tap_state_t end_state)
{ {
if (tap == NULL){ if (tap == NULL) {
return ERROR_TARGET_INVALID; return ERROR_TARGET_INVALID;
} }
...@@ -671,11 +671,11 @@ static int str9xpec_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t o ...@@ -671,11 +671,11 @@ static int str9xpec_write(struct flash_bank_s *bank, uint8_t *buffer, uint32_t o
check_address = sec_end; check_address = sec_end;
} }
if ((offset >= sec_start) && (offset < sec_end)){ if ((offset >= sec_start) && (offset < sec_end)) {
first_sector = i; first_sector = i;
} }
if ((offset + count >= sec_start) && (offset + count < sec_end)){ if ((offset + count >= sec_start) && (offset + count < sec_end)) {
last_sector = i; last_sector = i;
} }
} }
......
...@@ -348,7 +348,7 @@ int unregister_command(command_context_t *context, char *name) ...@@ -348,7 +348,7 @@ int unregister_command(command_context_t *context, char *name)
void command_output_text(command_context_t *context, const char *data) void command_output_text(command_context_t *context, const char *data)
{ {
if (context && context->output_handler && data){ if (context && context->output_handler && data) {
context->output_handler(context, data); context->output_handler(context, data);
} }
} }
......
...@@ -544,7 +544,7 @@ void Jim_Panic(Jim_Interp *interp, const char *fmt, ...) ...@@ -544,7 +544,7 @@ void Jim_Panic(Jim_Interp *interp, const char *fmt, ...)
#endif #endif
/* This may actually crash... we do it last */ /* This may actually crash... we do it last */
if (interp && interp->cookie_stderr){ if (interp && interp->cookie_stderr) {
Jim_fprintf(interp, interp->cookie_stderr, JIM_NL "JIM INTERPRETER PANIC: "); Jim_fprintf(interp, interp->cookie_stderr, JIM_NL "JIM INTERPRETER PANIC: ");
Jim_vfprintf(interp, interp->cookie_stderr, fmt, ap); Jim_vfprintf(interp, interp->cookie_stderr, fmt, ap);
Jim_fprintf(interp, interp->cookie_stderr, JIM_NL JIM_NL); Jim_fprintf(interp, interp->cookie_stderr, JIM_NL JIM_NL);
...@@ -2064,7 +2064,7 @@ void Jim_AppendString_sprintf(Jim_Interp *interp, Jim_Obj *objPtr, const char *f ...@@ -2064,7 +2064,7 @@ void Jim_AppendString_sprintf(Jim_Interp *interp, Jim_Obj *objPtr, const char *f
buf = jim_vasprintf(fmt, ap); buf = jim_vasprintf(fmt, ap);
va_end(ap); va_end(ap);
if (buf){ if (buf) {
Jim_AppendString(interp, objPtr, buf, -1); Jim_AppendString(interp, objPtr, buf, -1);
jim_vasprintf_done(buf); jim_vasprintf_done(buf);
} }
...@@ -2283,10 +2283,10 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr, ...@@ -2283,10 +2283,10 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr,
haveprec = 0; haveprec = 0;
prec = -1; /* not found yet */ prec = -1; /* not found yet */
next_fmt: next_fmt:
if (fmtLen <= 0){ if (fmtLen <= 0) {
break; break;
} }
switch (*fmt){ switch (*fmt) {
/* terminals */ /* terminals */
case 'b': /* binary - not all printfs() do this */ case 'b': /* binary - not all printfs() do this */
case 's': /* string */ case 's': /* string */
...@@ -2341,11 +2341,11 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr, ...@@ -2341,11 +2341,11 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr,
case '8': case '8':
case '9': case '9':
accum = 0; accum = 0;
while (isdigit(*fmt) && (fmtLen > 0)){ while (isdigit(*fmt) && (fmtLen > 0)) {
accum = (accum * 10) + (*fmt - '0'); accum = (accum * 10) + (*fmt - '0');
fmt++; fmtLen--; fmt++; fmtLen--;
} }
if (inprec){ if (inprec) {
haveprec = 1; haveprec = 1;
prec = accum; prec = accum;
} else { } else {
...@@ -2356,24 +2356,24 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr, ...@@ -2356,24 +2356,24 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr,
/* suck up the next item as an integer */ /* suck up the next item as an integer */
fmt++; fmtLen--; fmt++; fmtLen--;
objc--; objc--;
if (objc <= 0){ if (objc <= 0) {
goto not_enough_args; goto not_enough_args;
} }
if (Jim_GetWide(interp,objv[0],&wideValue)== JIM_ERR){ if (Jim_GetWide(interp,objv[0],&wideValue)== JIM_ERR) {
Jim_FreeNewObj(interp, resObjPtr); Jim_FreeNewObj(interp, resObjPtr);
return NULL; return NULL;
} }
if (inprec){ if (inprec) {
haveprec = 1; haveprec = 1;
prec = wideValue; prec = wideValue;
if (prec < 0){ if (prec < 0) {
/* man 3 printf says */ /* man 3 printf says */
/* if prec is negative, it is zero */ /* if prec is negative, it is zero */
prec = 0; prec = 0;
} }
} else { } else {
width = wideValue; width = wideValue;
if (width < 0){ if (width < 0) {
ljust = 1; ljust = 1;
width = -width; width = -width;
} }
...@@ -2402,32 +2402,32 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr, ...@@ -2402,32 +2402,32 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr,
*/ */
cp = fmt_str; cp = fmt_str;
*cp++ = '%'; *cp++ = '%';
if (altfm){ if (altfm) {
*cp++ = '#'; *cp++ = '#';
} }
if (forceplus){ if (forceplus) {
*cp++ = '+'; *cp++ = '+';
} else if (spad){ } else if (spad) {
/* PLUS overrides */ /* PLUS overrides */
*cp++ = ' '; *cp++ = ' ';
} }
if (ljust){ if (ljust) {
*cp++ = '-'; *cp++ = '-';
} }
if (zpad){ if (zpad) {
*cp++ = '0'; *cp++ = '0';
} }
if (width > 0){ if (width > 0) {
sprintf(cp, "%d", width); sprintf(cp, "%d", width);
/* skip ahead */ /* skip ahead */
cp = strchr(cp,0); cp = strchr(cp,0);
} }
/* did we find a period? */ /* did we find a period? */
if (inprec){ if (inprec) {
/* then add it */ /* then add it */
*cp++ = '.'; *cp++ = '.';
/* did something occur after the period? */ /* did something occur after the period? */
if (haveprec){ if (haveprec) {
sprintf(cp, "%d", prec); sprintf(cp, "%d", prec);
} }
cp = strchr(cp,0); cp = strchr(cp,0);
...@@ -2461,7 +2461,7 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr, ...@@ -2461,7 +2461,7 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr,
case 'E': case 'E':
*cp++ = *fmt; *cp++ = *fmt;
*cp = 0; *cp = 0;
if (Jim_GetDouble(interp, objv[0], &doubleValue) == JIM_ERR){ if (Jim_GetDouble(interp, objv[0], &doubleValue) == JIM_ERR) {
Jim_FreeNewObj(interp, resObjPtr); Jim_FreeNewObj(interp, resObjPtr);
return NULL; return NULL;
} }
...@@ -2475,7 +2475,7 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr, ...@@ -2475,7 +2475,7 @@ static Jim_Obj *Jim_FormatString_Inner(Jim_Interp *interp, Jim_Obj *fmtObjPtr,
case 'x': case 'x':
case 'X': case 'X':
/* jim widevaluse are 64bit */ /* jim widevaluse are 64bit */
if (sizeof(jim_wide) == sizeof(long long)){ if (sizeof(jim_wide) == sizeof(long long)) {
*cp++ = 'l'; *cp++ = 'l';
*cp++ = 'l'; *cp++ = 'l';
} else { } else {
...@@ -2627,12 +2627,12 @@ int Jim_GetNvp(Jim_Interp *interp, ...@@ -2627,12 +2627,12 @@ int Jim_GetNvp(Jim_Interp *interp,
int e; int e;
e = Jim_Nvp_name2value_obj(interp, nvp_table, objPtr, &n); e = Jim_Nvp_name2value_obj(interp, nvp_table, objPtr, &n);
if (e == JIM_ERR){ if (e == JIM_ERR) {
return e; return e;
} }
/* Success? found? */ /* Success? found? */
if (n->name){ if (n->name) {
/* remove const */ /* remove const */
*result = (Jim_Nvp *)n; *result = (Jim_Nvp *)n;
return JIM_OK; return JIM_OK;
...@@ -8894,7 +8894,7 @@ int Jim_Eval_Named(Jim_Interp *interp, const char *script, const char *filename, ...@@ -8894,7 +8894,7 @@ int Jim_Eval_Named(Jim_Interp *interp, const char *script, const char *filename,
Jim_IncrRefCount(scriptObjPtr); Jim_IncrRefCount(scriptObjPtr);
if (filename){ if (filename) {
JimSetSourceInfo(interp, scriptObjPtr, filename, lineno); JimSetSourceInfo(interp, scriptObjPtr, filename, lineno);
} }
...@@ -12412,7 +12412,7 @@ int Jim_fprintf(Jim_Interp *interp, void *cookie, const char *fmt, ...) ...@@ -12412,7 +12412,7 @@ int Jim_fprintf(Jim_Interp *interp, void *cookie, const char *fmt, ...)
int Jim_vfprintf(Jim_Interp *interp, void *cookie, const char *fmt, va_list ap) int Jim_vfprintf(Jim_Interp *interp, void *cookie, const char *fmt, va_list ap)
{ {
if ((interp == NULL) || (interp->cb_vfprintf == NULL)){ if ((interp == NULL) || (interp->cb_vfprintf == NULL)) {
errno = ENOTSUP; errno = ENOTSUP;
return -1; return -1;
} }
...@@ -12421,7 +12421,7 @@ int Jim_vfprintf(Jim_Interp *interp, void *cookie, const char *fmt, va_list ap) ...@@ -12421,7 +12421,7 @@ int Jim_vfprintf(Jim_Interp *interp, void *cookie, const char *fmt, va_list ap)
size_t Jim_fwrite(Jim_Interp *interp, const void *ptr, size_t size, size_t n, void *cookie) size_t Jim_fwrite(Jim_Interp *interp, const void *ptr, size_t size, size_t n, void *cookie)
{ {
if ((interp == NULL) || (interp->cb_fwrite == NULL)){ if ((interp == NULL) || (interp->cb_fwrite == NULL)) {
errno = ENOTSUP; errno = ENOTSUP;
return 0; return 0;
} }
...@@ -12430,7 +12430,7 @@ size_t Jim_fwrite(Jim_Interp *interp, const void *ptr, size_t size, size_t n, vo ...@@ -12430,7 +12430,7 @@ size_t Jim_fwrite(Jim_Interp *interp, const void *ptr, size_t size, size_t n, vo
size_t Jim_fread(Jim_Interp *interp, void *ptr, size_t size, size_t n, void *cookie) size_t Jim_fread(Jim_Interp *interp, void *ptr, size_t size, size_t n, void *cookie)
{ {
if ((interp == NULL) || (interp->cb_fread == NULL)){ if ((interp == NULL) || (interp->cb_fread == NULL)) {
errno = ENOTSUP; errno = ENOTSUP;
return 0; return 0;
} }
...@@ -12439,7 +12439,7 @@ size_t Jim_fread(Jim_Interp *interp, void *ptr, size_t size, size_t n, void *coo ...@@ -12439,7 +12439,7 @@ size_t Jim_fread(Jim_Interp *interp, void *ptr, size_t size, size_t n, void *coo
int Jim_fflush(Jim_Interp *interp, void *cookie) int Jim_fflush(Jim_Interp *interp, void *cookie)
{ {
if ((interp == NULL) || (interp->cb_fflush == NULL)){ if ((interp == NULL) || (interp->cb_fflush == NULL)) {
/* pretend all is well */ /* pretend all is well */
return 0; return 0;
} }
...@@ -12448,7 +12448,7 @@ int Jim_fflush(Jim_Interp *interp, void *cookie) ...@@ -12448,7 +12448,7 @@ int Jim_fflush(Jim_Interp *interp, void *cookie)
char* Jim_fgets(Jim_Interp *interp, char *s, int size, void *cookie) char* Jim_fgets(Jim_Interp *interp, char *s, int size, void *cookie)
{ {
if ((interp == NULL) || (interp->cb_fgets == NULL)){ if ((interp == NULL) || (interp->cb_fgets == NULL)) {
errno = ENOTSUP; errno = ENOTSUP;
return NULL; return NULL;
} }
...@@ -12457,8 +12457,8 @@ char* Jim_fgets(Jim_Interp *interp, char *s, int size, void *cookie) ...@@ -12457,8 +12457,8 @@ char* Jim_fgets(Jim_Interp *interp, char *s, int size, void *cookie)
Jim_Nvp * Jim_Nvp *
Jim_Nvp_name2value_simple(const Jim_Nvp *p, const char *name) Jim_Nvp_name2value_simple(const Jim_Nvp *p, const char *name)
{ {
while (p->name){ while (p->name) {
if (0 == strcmp(name, p->name)){ if (0 == strcmp(name, p->name)) {
break; break;
} }
p++; p++;
...@@ -12469,8 +12469,8 @@ Jim_Nvp_name2value_simple(const Jim_Nvp *p, const char *name) ...@@ -12469,8 +12469,8 @@ Jim_Nvp_name2value_simple(const Jim_Nvp *p, const char *name)
Jim_Nvp * Jim_Nvp *
Jim_Nvp_name2value_nocase_simple(const Jim_Nvp *p, const char *name) Jim_Nvp_name2value_nocase_simple(const Jim_Nvp *p, const char *name)
{ {
while (p->name){ while (p->name) {
if (0 == strcasecmp(name, p->name)){ if (0 == strcasecmp(name, p->name)) {
break; break;
} }
p++; p++;
...@@ -12499,12 +12499,12 @@ Jim_Nvp_name2value(Jim_Interp *interp, ...@@ -12499,12 +12499,12 @@ Jim_Nvp_name2value(Jim_Interp *interp,
p = Jim_Nvp_name2value_simple(_p, name); p = Jim_Nvp_name2value_simple(_p, name);
/* result */ /* result */
if (result){ if (result) {
*result = (Jim_Nvp *)(p); *result = (Jim_Nvp *)(p);
} }
/* found? */ /* found? */
if (p->name){ if (p->name) {
return JIM_OK; return JIM_OK;
} else { } else {
return JIM_ERR; return JIM_ERR;
...@@ -12524,11 +12524,11 @@ Jim_Nvp_name2value_nocase(Jim_Interp *interp, const Jim_Nvp *_p, const char *nam ...@@ -12524,11 +12524,11 @@ Jim_Nvp_name2value_nocase(Jim_Interp *interp, const Jim_Nvp *_p, const char *nam
p = Jim_Nvp_name2value_nocase_simple(_p, name); p = Jim_Nvp_name2value_nocase_simple(_p, name);
if (puthere){ if (puthere) {
*puthere = (Jim_Nvp *)(p); *puthere = (Jim_Nvp *)(p);
} }
/* found */ /* found */
if (p->name){ if (p->name) {
return JIM_OK; return JIM_OK;
} else { } else {
return JIM_ERR; return JIM_ERR;
...@@ -12543,7 +12543,7 @@ Jim_Nvp_value2name_obj(Jim_Interp *interp, const Jim_Nvp *p, Jim_Obj *o, Jim_Nvp ...@@ -12543,7 +12543,7 @@ Jim_Nvp_value2name_obj(Jim_Interp *interp, const Jim_Nvp *p, Jim_Obj *o, Jim_Nvp
jim_wide w; jim_wide w;
e = Jim_GetWide(interp, o, &w); e = Jim_GetWide(interp, o, &w);
if (e != JIM_OK){ if (e != JIM_OK) {
return e; return e;
} }
...@@ -12553,8 +12553,8 @@ Jim_Nvp_value2name_obj(Jim_Interp *interp, const Jim_Nvp *p, Jim_Obj *o, Jim_Nvp ...@@ -12553,8 +12553,8 @@ Jim_Nvp_value2name_obj(Jim_Interp *interp, const Jim_Nvp *p, Jim_Obj *o, Jim_Nvp
Jim_Nvp * Jim_Nvp *
Jim_Nvp_value2name_simple(const Jim_Nvp *p, int value) Jim_Nvp_value2name_simple(const Jim_Nvp *p, int value)
{ {
while (p->name){ while (p->name) {
if (value == p->value){ if (value == p->value) {
break; break;
} }
p++; p++;
...@@ -12570,11 +12570,11 @@ Jim_Nvp_value2name(Jim_Interp *interp, const Jim_Nvp *_p, int value, Jim_Nvp **r ...@@ -12570,11 +12570,11 @@ Jim_Nvp_value2name(Jim_Interp *interp, const Jim_Nvp *_p, int value, Jim_Nvp **r
p = Jim_Nvp_value2name_simple(_p, value); p = Jim_Nvp_value2name_simple(_p, value);
if (result){ if (result) {
*result = (Jim_Nvp *)(p); *result = (Jim_Nvp *)(p);
} }
if (p->name){ if (p->name) {
return JIM_OK; return JIM_OK;
} else { } else {
return JIM_ERR; return JIM_ERR;
...@@ -12599,7 +12599,7 @@ Jim_GetOpt_Debug(Jim_GetOptInfo *p) ...@@ -12599,7 +12599,7 @@ Jim_GetOpt_Debug(Jim_GetOptInfo *p)
int x; int x;
Jim_fprintf(p->interp, p->interp->cookie_stderr, "---args---\n"); Jim_fprintf(p->interp, p->interp->cookie_stderr, "---args---\n");
for (x = 0 ; x < p->argc ; x++){ for (x = 0 ; x < p->argc ; x++) {
Jim_fprintf(p->interp, p->interp->cookie_stderr, Jim_fprintf(p->interp, p->interp->cookie_stderr,
"%2d) %s\n", "%2d) %s\n",
x, x,
...@@ -12615,16 +12615,16 @@ Jim_GetOpt_Obj(Jim_GetOptInfo *goi, Jim_Obj **puthere) ...@@ -12615,16 +12615,16 @@ Jim_GetOpt_Obj(Jim_GetOptInfo *goi, Jim_Obj **puthere)
Jim_Obj *o; Jim_Obj *o;
o = NULL; // failure o = NULL; // failure
if (goi->argc){ if (goi->argc) {
// success // success
o = goi->argv[0]; o = goi->argv[0];
goi->argc -= 1; goi->argc -= 1;
goi->argv += 1; goi->argv += 1;
} }
if (puthere){ if (puthere) {
*puthere = o; *puthere = o;
} }
if (o != NULL){ if (o != NULL) {
return JIM_OK; return JIM_OK;
} else { } else {
return JIM_ERR; return JIM_ERR;
...@@ -12640,9 +12640,9 @@ Jim_GetOpt_String(Jim_GetOptInfo *goi, char **puthere, int *len) ...@@ -12640,9 +12640,9 @@ Jim_GetOpt_String(Jim_GetOptInfo *goi, char **puthere, int *len)
r = Jim_GetOpt_Obj(goi, &o); r = Jim_GetOpt_Obj(goi, &o);
if (r == JIM_OK){ if (r == JIM_OK) {
cp = Jim_GetString(o, len); cp = Jim_GetString(o, len);
if (puthere){ if (puthere) {
/* remove const */ /* remove const */
*puthere = (char *)(cp); *puthere = (char *)(cp);
} }
...@@ -12657,14 +12657,14 @@ Jim_GetOpt_Double(Jim_GetOptInfo *goi, double *puthere) ...@@ -12657,14 +12657,14 @@ Jim_GetOpt_Double(Jim_GetOptInfo *goi, double *puthere)
Jim_Obj *o; Jim_Obj *o;
double _safe; double _safe;
if (puthere == NULL){ if (puthere == NULL) {
puthere = &_safe; puthere = &_safe;
} }
r = Jim_GetOpt_Obj(goi, &o); r = Jim_GetOpt_Obj(goi, &o);
if (r == JIM_OK){ if (r == JIM_OK) {
r = Jim_GetDouble(goi->interp, o, puthere); r = Jim_GetDouble(goi->interp, o, puthere);
if (r != JIM_OK){ if (r != JIM_OK) {
Jim_SetResult_sprintf(goi->interp, Jim_SetResult_sprintf(goi->interp,
"not a number: %s", "not a number: %s",
Jim_GetString(o, NULL)); Jim_GetString(o, NULL));
...@@ -12680,12 +12680,12 @@ Jim_GetOpt_Wide(Jim_GetOptInfo *goi, jim_wide *puthere) ...@@ -12680,12 +12680,12 @@ Jim_GetOpt_Wide(Jim_GetOptInfo *goi, jim_wide *puthere)
Jim_Obj *o; Jim_Obj *o;
jim_wide _safe; jim_wide _safe;
if (puthere == NULL){ if (puthere == NULL) {
puthere = &_safe; puthere = &_safe;
} }
r = Jim_GetOpt_Obj(goi, &o); r = Jim_GetOpt_Obj(goi, &o);
if (r == JIM_OK){ if (r == JIM_OK) {
r = Jim_GetWide(goi->interp, o, puthere); r = Jim_GetWide(goi->interp, o, puthere);
} }
return r; return r;
...@@ -12699,12 +12699,12 @@ int Jim_GetOpt_Nvp(Jim_GetOptInfo *goi, ...@@ -12699,12 +12699,12 @@ int Jim_GetOpt_Nvp(Jim_GetOptInfo *goi,
Jim_Obj *o; Jim_Obj *o;
int e; int e;
if (puthere == NULL){ if (puthere == NULL) {
puthere = &_safe; puthere = &_safe;
} }
e = Jim_GetOpt_Obj(goi, &o); e = Jim_GetOpt_Obj(goi, &o);
if (e == JIM_OK){ if (e == JIM_OK) {
e = Jim_Nvp_name2value_obj(goi->interp, e = Jim_Nvp_name2value_obj(goi->interp,
nvp, nvp,
o, o,
...@@ -12719,7 +12719,7 @@ Jim_GetOpt_NvpUnknown(Jim_GetOptInfo *goi, ...@@ -12719,7 +12719,7 @@ Jim_GetOpt_NvpUnknown(Jim_GetOptInfo *goi,
const Jim_Nvp *nvptable, const Jim_Nvp *nvptable,
int hadprefix) int hadprefix)
{ {
if (hadprefix){ if (hadprefix) {
Jim_SetResult_NvpUnknown(goi->interp, Jim_SetResult_NvpUnknown(goi->interp,
goi->argv[-2], goi->argv[-2],
goi->argv[-1], goi->argv[-1],
...@@ -12742,11 +12742,11 @@ Jim_GetOpt_Enum(Jim_GetOptInfo *goi, ...@@ -12742,11 +12742,11 @@ Jim_GetOpt_Enum(Jim_GetOptInfo *goi,
Jim_Obj *o; Jim_Obj *o;
int e; int e;
if (puthere == NULL){ if (puthere == NULL) {
puthere = &_safe; puthere = &_safe;
} }
e = Jim_GetOpt_Obj(goi, &o); e = Jim_GetOpt_Obj(goi, &o);
if (e == JIM_OK){ if (e == JIM_OK) {
e = Jim_GetEnum(goi->interp, e = Jim_GetEnum(goi->interp,
o, o,
lookup, lookup,
...@@ -12768,7 +12768,7 @@ Jim_SetResult_sprintf(Jim_Interp *interp, const char *fmt,...) ...@@ -12768,7 +12768,7 @@ Jim_SetResult_sprintf(Jim_Interp *interp, const char *fmt,...)
va_start(ap,fmt); va_start(ap,fmt);
buf = jim_vasprintf(fmt, ap); buf = jim_vasprintf(fmt, ap);
va_end(ap);