--- Gnu-Mach/ddb/db_expr.c 2020/09/02 04:36:57 1.1 +++ Gnu-Mach/ddb/db_expr.c 2020/09/02 04:48:21 1.1.1.4 @@ -1,25 +1,25 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ @@ -27,7 +27,7 @@ * Author: David B. Golub, Carnegie Mellon University * Date: 7/90 */ -#include "mach_kdb.h" + #if MACH_KDB #include @@ -35,12 +35,14 @@ #include #include #include +#include +#include +#include +#include #include - boolean_t -db_term(valuep) - db_expr_t *valuep; +db_term(db_expr_t *valuep) { int t; @@ -91,12 +93,12 @@ db_term(valuep) int db_size_option(modif, u_option, t_option) - char *modif; + const char *modif; boolean_t *u_option; boolean_t *t_option; { - register char *p; - int size = sizeof(int); + const char *p; + int size = sizeof(int); *u_option = FALSE; *t_option = FALSE; @@ -123,8 +125,7 @@ db_size_option(modif, u_option, t_option } boolean_t -db_unary(valuep) - db_expr_t *valuep; +db_unary(db_expr_t *valuep) { int t; int size; @@ -173,10 +174,9 @@ db_unary(valuep) } boolean_t -db_mult_expr(valuep) - db_expr_t *valuep; +db_mult_expr(db_expr_t *valuep) { - db_expr_t lhs, rhs; + db_expr_t lhs = 0, rhs; int t; char c; @@ -219,8 +219,7 @@ db_mult_expr(valuep) } boolean_t -db_add_expr(valuep) - db_expr_t *valuep; +db_add_expr(db_expr_t *valuep) { db_expr_t lhs, rhs; int t; @@ -251,8 +250,7 @@ db_add_expr(valuep) } boolean_t -db_shift_expr(valuep) - db_expr_t *valuep; +db_shift_expr(db_expr_t *valuep) { db_expr_t lhs, rhs; int t; @@ -286,8 +284,7 @@ db_shift_expr(valuep) } boolean_t -db_logical_relation_expr(valuep) - db_expr_t *valuep; +db_logical_relation_expr(db_expr_t *valuep) { db_expr_t lhs, rhs; int t; @@ -336,8 +333,7 @@ db_logical_relation_expr(valuep) } boolean_t -db_logical_and_expr(valuep) - db_expr_t *valuep; +db_logical_and_expr(db_expr_t *valuep) { db_expr_t lhs, rhs; int t; @@ -359,8 +355,7 @@ db_logical_and_expr(valuep) } boolean_t -db_logical_or_expr(valuep) - db_expr_t *valuep; +db_logical_or_expr(db_expr_t *valuep) { db_expr_t lhs, rhs; int t; @@ -382,10 +377,9 @@ db_logical_or_expr(valuep) } int -db_expression(valuep) - db_expr_t *valuep; +db_expression(db_expr_t *valuep) { return (db_logical_or_expr(valuep)); } -#endif MACH_KDB +#endif /* MACH_KDB */