Skip to content

Commit

Permalink
ddb: stop boolean screaming.
Browse files Browse the repository at this point in the history
TRUE --> true
FALSE--> false

Hinted by:	NetBSD
  • Loading branch information
pgiffuni committed May 18, 2015
1 parent d44bc13 commit 2b490bc
Show file tree
Hide file tree
Showing 12 changed files with 101 additions and 101 deletions.
8 changes: 4 additions & 4 deletions sys/ddb/db_break.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ db_find_breakpoint_here(db_addr_t addr)
return db_find_breakpoint(db_map_addr(addr), addr);
}

static boolean_t db_breakpoints_inserted = TRUE;
static boolean_t db_breakpoints_inserted = true;

#ifndef BKPT_WRITE
#define BKPT_WRITE(addr, storage) \
do { \
*storage = db_get_value(addr, BKPT_SIZE, FALSE); \
*storage = db_get_value(addr, BKPT_SIZE, false); \
db_put_value(addr, BKPT_SIZE, BKPT_SET(*storage)); \
} while (0)
#endif
Expand All @@ -183,7 +183,7 @@ db_set_breakpoints(void)
if (db_map_current(bkpt->map)) {
BKPT_WRITE(bkpt->address, &bkpt->bkpt_inst);
}
db_breakpoints_inserted = TRUE;
db_breakpoints_inserted = true;
}
}

Expand All @@ -200,7 +200,7 @@ db_clear_breakpoints(void)
if (db_map_current(bkpt->map)) {
BKPT_CLEAR(bkpt->address, &bkpt->bkpt_inst);
}
db_breakpoints_inserted = FALSE;
db_breakpoints_inserted = false;
}
}

Expand Down
12 changes: 6 additions & 6 deletions sys/ddb/db_command.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static struct command *db_last_command = 0;
* and '+' points to next line.
* Otherwise: 'dot' points to next item, '..' points to last.
*/
static boolean_t db_ed_style = TRUE;
static boolean_t db_ed_style = true;

/*
* Utility routine - discard tokens through end-of-line.
Expand Down Expand Up @@ -327,15 +327,15 @@ db_command(struct command **last_cmdp, struct command_table *cmd_table,
int t;
char modif[TOK_STRING_SIZE];
db_expr_t addr, count;
boolean_t have_addr = FALSE;
boolean_t have_addr = false;
int result;

t = db_read_token();
if (t == tEOL) {
/* empty line repeats last command, at 'next' */
cmd = *last_cmdp;
addr = (db_expr_t)db_next;
have_addr = FALSE;
have_addr = false;
count = 1;
modif[0] = '\0';
}
Expand Down Expand Up @@ -405,11 +405,11 @@ db_command(struct command **last_cmdp, struct command_table *cmd_table,
if (db_expression(&addr)) {
db_dot = (db_addr_t) addr;
db_last_addr = db_dot;
have_addr = TRUE;
have_addr = true;
}
else {
addr = (db_expr_t) db_dot;
have_addr = FALSE;
have_addr = false;
}
t = db_read_token();
if (t == tCOMMA) {
Expand Down Expand Up @@ -530,7 +530,7 @@ db_dump(db_expr_t dummy, boolean_t dummy2, db_expr_t dummy3, char *dummy4)
"run \"textdump unset\" first or \"textdump dump\" for a textdump.\n");
return;
}
error = doadump(FALSE);
error = doadump(false);
if (error) {
db_printf("Cannot dump: ");
switch (error) {
Expand Down
26 changes: 13 additions & 13 deletions sys/ddb/db_examine.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,37 +110,37 @@ db_examine(db_addr_t addr, char *fmt, int count)
width = size * 4;
switch (c) {
case 'r': /* signed, current radix */
value = db_get_value(addr, size, TRUE);
value = db_get_value(addr, size, true);
addr += size;
db_printf("%+-*lr", width, (long)value);
break;
case 'x': /* unsigned hex */
value = db_get_value(addr, size, FALSE);
value = db_get_value(addr, size, false);
addr += size;
db_printf("%-*lx", width, (long)value);
break;
case 'z': /* signed hex */
value = db_get_value(addr, size, TRUE);
value = db_get_value(addr, size, true);
addr += size;
db_printf("%-*ly", width, (long)value);
break;
case 'd': /* signed decimal */
value = db_get_value(addr, size, TRUE);
value = db_get_value(addr, size, true);
addr += size;
db_printf("%-*ld", width, (long)value);
break;
case 'u': /* unsigned decimal */
value = db_get_value(addr, size, FALSE);
value = db_get_value(addr, size, false);
addr += size;
db_printf("%-*lu", width, (long)value);
break;
case 'o': /* unsigned octal */
value = db_get_value(addr, size, FALSE);
value = db_get_value(addr, size, false);
addr += size;
db_printf("%-*lo", width, (long)value);
break;
case 'c': /* character */
value = db_get_value(addr, 1, FALSE);
value = db_get_value(addr, 1, false);
addr += 1;
if (value >= ' ' && value <= '~')
db_printf("%c", (int)value);
Expand All @@ -149,7 +149,7 @@ db_examine(db_addr_t addr, char *fmt, int count)
break;
case 's': /* null-terminated string */
for (;;) {
value = db_get_value(addr, 1, FALSE);
value = db_get_value(addr, 1, false);
addr += 1;
if (value == 0)
break;
Expand All @@ -161,15 +161,15 @@ db_examine(db_addr_t addr, char *fmt, int count)
break;
case 'S': /* symbol */
value = db_get_value(addr, sizeof(void *),
FALSE);
false);
addr += sizeof(void *);
db_printsym(value, DB_STGY_ANY);
break;
case 'i': /* instruction */
addr = db_disasm(addr, FALSE);
addr = db_disasm(addr, false);
break;
case 'I': /* instruction, alternate form */
addr = db_disasm(addr, TRUE);
addr = db_disasm(addr, true);
break;
default:
break;
Expand Down Expand Up @@ -236,7 +236,7 @@ db_print_loc_and_inst(db_addr_t loc)
{
db_printsym(loc, DB_STGY_PROC);
db_printf(":\t");
(void) db_disasm(loc, TRUE);
(void) db_disasm(loc, true);
}

/*
Expand Down Expand Up @@ -314,7 +314,7 @@ db_search(db_addr_t addr, int size, db_expr_t value, db_expr_t mask,
{
while (count-- != 0) {
db_prev = addr;
if ((db_get_value(addr, size, FALSE) & mask) == value)
if ((db_get_value(addr, size, false) & mask) == value)
break;
addr += size;
}
Expand Down
38 changes: 19 additions & 19 deletions sys/ddb/db_expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,32 @@ db_term(db_expr_t *valuep)
db_error("Symbol not found\n");
/*NOTREACHED*/
}
return (TRUE);
return (true);
}
if (t == tNUMBER) {
*valuep = (db_expr_t)db_tok_number;
return (TRUE);
return (true);
}
if (t == tDOT) {
*valuep = (db_expr_t)db_dot;
return (TRUE);
return (true);
}
if (t == tDOTDOT) {
*valuep = (db_expr_t)db_prev;
return (TRUE);
return (true);
}
if (t == tPLUS) {
*valuep = (db_expr_t) db_next;
return (TRUE);
return (true);
}
if (t == tDITTO) {
*valuep = (db_expr_t)db_last_addr;
return (TRUE);
return (true);
}
if (t == tDOLLAR) {
if (!db_get_variable(valuep))
return (FALSE);
return (TRUE);
return (false);
return (true);
}
if (t == tLPAREN) {
if (!db_expression(valuep)) {
Expand All @@ -94,10 +94,10 @@ db_term(db_expr_t *valuep)
db_error("Syntax error\n");
/*NOTREACHED*/
}
return (TRUE);
return (true);
}
db_unread_token(t);
return (FALSE);
return (false);
}

static boolean_t
Expand All @@ -112,16 +112,16 @@ db_unary(db_expr_t *valuep)
/*NOTREACHED*/
}
*valuep = -*valuep;
return (TRUE);
return (true);
}
if (t == tSTAR) {
/* indirection */
if (!db_unary(valuep)) {
db_error("Syntax error\n");
/*NOTREACHED*/
}
*valuep = db_get_value((db_addr_t)*valuep, sizeof(void *), FALSE);
return (TRUE);
*valuep = db_get_value((db_addr_t)*valuep, sizeof(void *), false);
return (true);
}
db_unread_token(t);
return (db_term(valuep));
Expand All @@ -134,7 +134,7 @@ db_mult_expr(db_expr_t *valuep)
int t;

if (!db_unary(&lhs))
return (FALSE);
return (false);

t = db_read_token();
while (t == tSTAR || t == tSLASH || t == tPCT || t == tHASH) {
Expand All @@ -160,7 +160,7 @@ db_mult_expr(db_expr_t *valuep)
}
db_unread_token(t);
*valuep = lhs;
return (TRUE);
return (true);
}

static boolean_t
Expand All @@ -170,7 +170,7 @@ db_add_expr(db_expr_t *valuep)
int t;

if (!db_mult_expr(&lhs))
return (FALSE);
return (false);

t = db_read_token();
while (t == tPLUS || t == tMINUS) {
Expand All @@ -186,7 +186,7 @@ db_add_expr(db_expr_t *valuep)
}
db_unread_token(t);
*valuep = lhs;
return (TRUE);
return (true);
}

static boolean_t
Expand All @@ -196,7 +196,7 @@ db_shift_expr(db_expr_t *valuep)
int t;

if (!db_add_expr(&lhs))
return (FALSE);
return (false);

t = db_read_token();
while (t == tSHIFT_L || t == tSHIFT_R) {
Expand All @@ -218,7 +218,7 @@ db_shift_expr(db_expr_t *valuep)
}
db_unread_token(t);
*valuep = lhs;
return (TRUE);
return (true);
}

int
Expand Down
2 changes: 1 addition & 1 deletion sys/ddb/db_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ db_delete(n, bwd)
db_le -= n;
}

/* returns TRUE at end-of-line */
/* returns true at end-of-line */
static int
db_inputchar(c)
int c;
Expand Down
4 changes: 2 additions & 2 deletions sys/ddb/db_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ boolean_t
X_db_line_at_pc(db_symtab_t *symtab, c_db_sym_t sym, char **file, int *line,
db_expr_t off)
{
return (FALSE);
return (false);
}

c_db_sym_t
Expand Down Expand Up @@ -149,7 +149,7 @@ boolean_t
X_db_sym_numargs(db_symtab_t *symtab, c_db_sym_t sym, int *nargp,
char **argp)
{
return (FALSE);
return (false);
}

void
Expand Down
12 changes: 6 additions & 6 deletions sys/ddb/db_ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ DB_SHOW_COMMAND(thread, db_show_thread)

/* Determine which thread to examine. */
if (have_addr)
td = db_lookup_thread(addr, FALSE);
td = db_lookup_thread(addr, false);
else
td = kdb_thread;
lock = (struct lock_object *)td->td_lock;
Expand Down Expand Up @@ -332,28 +332,28 @@ DB_SHOW_COMMAND(thread, db_show_thread)
break;
case TDS_INHIBITED:
db_printf("INHIBITED: {");
comma = FALSE;
comma = false;
if (TD_IS_SLEEPING(td)) {
db_printf("SLEEPING");
comma = TRUE;
comma = true;
}
if (TD_IS_SUSPENDED(td)) {
if (comma)
db_printf(", ");
db_printf("SUSPENDED");
comma = TRUE;
comma = true;
}
if (TD_IS_SWAPPED(td)) {
if (comma)
db_printf(", ");
db_printf("SWAPPED");
comma = TRUE;
comma = true;
}
if (TD_ON_LOCK(td)) {
if (comma)
db_printf(", ");
db_printf("LOCK");
comma = TRUE;
comma = true;
}
if (TD_AWAITING_INTR(td)) {
if (comma)
Expand Down
Loading

0 comments on commit 2b490bc

Please sign in to comment.