aboutsummaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2012-12-09 22:11:01 +0200
committerArnold D. Robbins <arnold@skeeve.com>2012-12-09 22:11:01 +0200
commitae9e583a257264f4580d07354e79aac63db72695 (patch)
tree5a03a771ec6588c0dede291c56df8ec9cb783f7a /debug.c
parenta5a114bf6c6f2efdcd7889ebf0d7f9f3ec235a74 (diff)
parentd283194601bc7cb7c071317a8d53a89a3cbac40d (diff)
downloadegawk-ae9e583a257264f4580d07354e79aac63db72695.tar.gz
egawk-ae9e583a257264f4580d07354e79aac63db72695.tar.bz2
egawk-ae9e583a257264f4580d07354e79aac63db72695.zip
Merge branch 'master' into array-iface
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/debug.c b/debug.c
index 90a9d802..7dff7b8d 100644
--- a/debug.c
+++ b/debug.c
@@ -745,16 +745,16 @@ do_info(CMDARG *arg, int cmd ATTRIBUTE_UNUSED)
gprintf(out_fp, _("Number Disp Enabled Location\n\n"));
for (b = breakpoints.prev; b != &breakpoints; b = b->prev) {
char *disp = "keep";
- if (b->flags & BP_ENABLE_ONCE)
+ if ((b->flags & BP_ENABLE_ONCE) != 0)
disp = "dis";
- else if(b->flags & BP_TEMP)
+ else if ((b->flags & BP_TEMP) != 0)
disp = "del";
gprintf(out_fp, "%-6d %-4.4s %-7.7s file %s, line #%d\n",
- b->number, disp, (b->flags & BP_ENABLE) ? "yes" : "no",
+ b->number, disp, (b->flags & BP_ENABLE) != 0 ? "yes" : "no",
b->src, b->bpi->source_line);
if (b->hit_count > 0)
gprintf(out_fp, _("\tno of hits = %ld\n"), b->hit_count);
- if (b->flags & BP_IGNORE)
+ if ((b->flags & BP_IGNORE) != 0)
gprintf(out_fp, _("\tignore next %ld hit(s)\n"), b->ignore_count);
if (b->cndn.code != NULL)
gprintf(out_fp, _("\tstop condition: %s\n"), b->cndn.expr);
@@ -2172,8 +2172,8 @@ add_breakpoint(INSTRUCTION *prevp, INSTRUCTION *ip, char *src, bool silent)
* This is more verbose that it might otherwise be,
* in order to provide easily translatable strings.
*/
- if (b->flags & BP_ENABLE) {
- if (b->flags & BP_IGNORE)
+ if ((b->flags & BP_ENABLE) != 0) {
+ if ((b->flags & BP_IGNORE) != 0)
fprintf(out_fp,
_("Note: breakpoint %d (enabled, ignore next %ld hits), also set at %s:%d"),
b->number,
@@ -2187,7 +2187,7 @@ add_breakpoint(INSTRUCTION *prevp, INSTRUCTION *ip, char *src, bool silent)
b->src,
lineno);
} else {
- if (b->flags & BP_IGNORE)
+ if ((b->flags & BP_IGNORE) != 0)
fprintf(out_fp,
_("Note: breakpoint %d (disabled, ignore next %ld hits), also set at %s:%d"),
b->number,
@@ -2402,7 +2402,7 @@ breakpoint_triggered(BREAKPOINT *b)
return 0;
b->hit_count++;
- if (b->flags & BP_ENABLE_ONCE) {
+ if ((b->flags & BP_ENABLE_ONCE) != 0) {
b->flags &= ~BP_ENABLE_ONCE;
b->flags &= ~BP_ENABLE;
}
@@ -3404,9 +3404,9 @@ else \
valinfo(w->V, fprintf, out_fp);
fprintf(out_fp, " Old value: ");
- print_value((w->flags & OLD_IS_ARRAY), old_size, old_value);
+ print_value((w->flags & OLD_IS_ARRAY) != 0, old_size, old_value);
fprintf(out_fp, " New value: ");
- print_value((w->flags & CUR_IS_ARRAY), cur_size, cur_value);
+ print_value((w->flags & CUR_IS_ARRAY) != 0, cur_size, cur_value);
#undef print_value
}
@@ -3656,9 +3656,9 @@ print_memory(NODE *m, NODE *func, Func_print print_func, FILE *fp)
print_func(fp, "Nnull_string");
else if ((m->flags & NUMBER) != 0) {
#ifdef HAVE_MPFR
- if (m->flags & MPFN)
+ if ((m->flags & MPFN) != 0)
print_func(fp, "%s", mpg_fmt("%R*g", ROUND_MODE, m->mpg_numbr));
- else if (m->flags & MPZN)
+ else if ((m->flags & MPZN) != 0)
print_func(fp, "%s", mpg_fmt("%Zd", m->mpg_i));
else
#endif
@@ -3667,9 +3667,9 @@ print_memory(NODE *m, NODE *func, Func_print print_func, FILE *fp)
pp_string_fp(print_func, fp, m->stptr, m->stlen, '"', false);
else if ((m->flags & NUMCUR) != 0) {
#ifdef HAVE_MPFR
- if (m->flags & MPFN)
+ if ((m->flags & MPFN) != 0)
print_func(fp, "%s", mpg_fmt("%R*g", ROUND_MODE, m->mpg_numbr));
- else if (m->flags & MPZN)
+ else if ((m->flags & MPZN) != 0)
print_func(fp, "%s", mpg_fmt("%Zd", m->mpg_i));
else
#endif
@@ -3873,9 +3873,9 @@ print_instruction(INSTRUCTION *pc, Func_print print_func, FILE *fp, int in_dump)
{ 0, NULL }
};
- if (pc->sub_flags & GSUB)
+ if ((pc->sub_flags & GSUB) != 0)
fname = "gsub";
- else if (pc->sub_flags & GENSUB)
+ else if ((pc->sub_flags & GENSUB) != 0)
fname = "gensub";
print_func(fp, "%s [arg_count = %ld] [sub_flags = %s]\n",
fname, pc->expr_count,
@@ -3918,7 +3918,7 @@ print_instruction(INSTRUCTION *pc, Func_print print_func, FILE *fp, int in_dump)
/* NB: concat_flag CSVAR only used in grammar, don't display it */
print_func(fp, "[expr_count = %ld] [concat_flag = %s]\n",
pc->expr_count,
- (pc->concat_flag & CSUBSEP) ? "CSUBSEP" : "0");
+ (pc->concat_flag & CSUBSEP) != 0 ? "CSUBSEP" : "0");
break;
case Op_rule: