From fe0231ba14d8597b0d78bf6121dd15a82bbab34a Mon Sep 17 00:00:00 2001 From: Marin Ramesa Date: Fri, 4 Apr 2014 22:32:14 +0200 Subject: Convert from K&R to ANSI Convert from K&R style function definitions to ANSI style function definitions. * ddb/db_access.c: Convert function prototypes from K&R to ANSI. * ddb/db_aout.c: Likewise. * ddb/db_break.c: Likewise. * ddb/db_command.c: Likewise. * ddb/db_cond.c: Likewise. * ddb/db_examine.c: Likewise. * ddb/db_expr.c: Likewise. * ddb/db_ext_symtab.c: Likewise. * ddb/db_input.c: Likewise. * ddb/db_lex.c: Likewise. * ddb/db_macro.c: Likewise. * ddb/db_mp.c: Likewise. * ddb/db_output.c: Likewise. * ddb/db_print.c: Likewise. * ddb/db_run.c: Likewise. * ddb/db_sym.c: Likewise. * ddb/db_task_thread.c: Likewise. * ddb/db_trap.c: Likewise. * ddb/db_variables.c: Likewise. * ddb/db_watch.c: Likewise. * device/blkio.c: Likewise. * device/chario.c: Likewise. * device/dev_lookup.c: Likewise. * device/dev_name.c: Likewise. * device/dev_pager.c: Likewise. * device/ds_routines.c: Likewise. * device/net_io.c: Likewise. * device/subrs.c: Likewise. * i386/i386/db_interface.c: Likewise. * i386/i386/fpu.c: Likewise. * i386/i386/io_map.c: Likewise. * i386/i386/loose_ends.c: Likewise. * i386/i386/mp_desc.c: Likewise. * i386/i386/pcb.c: Likewise. * i386/i386/phys.c: Likewise. * i386/i386/trap.c: Likewise. * i386/i386/user_ldt.c: Likewise. * i386/i386at/com.c: Likewise. * i386/i386at/kd.c: Likewise. * i386/i386at/kd_event.c: Likewise. * i386/i386at/kd_mouse.c: Likewise. * i386/i386at/kd_queue.c: Likewise. * i386/i386at/lpr.c: Likewise. * i386/i386at/model_dep.c: Likewise. * i386/i386at/rtc.c: Likewise. * i386/intel/pmap.c: Likewise. * i386/intel/read_fault.c: Likewise. * ipc/ipc_entry.c: Likewise. * ipc/ipc_hash.c: Likewise. * ipc/ipc_kmsg.c: Likewise. * ipc/ipc_marequest.c: Likewise. * ipc/ipc_mqueue.c: Likewise. * ipc/ipc_notify.c: Likewise. * ipc/ipc_port.c: Likewise. * ipc/ipc_right.c: Likewise. * ipc/mach_debug.c: Likewise. * ipc/mach_msg.c: Likewise. * ipc/mach_port.c: Likewise. * ipc/mach_rpc.c: Likewise. * kern/act.c: Likewise. * kern/exception.c: Likewise. * kern/ipc_mig.c: Likewise. * kern/ipc_tt.c: Likewise. * kern/lock_mon.c: Likewise. * kern/mach_clock.c: Likewise. * kern/machine.c: Likewise. * kern/printf.c: Likewise. * kern/priority.c: Likewise. * kern/startup.c: Likewise. * kern/syscall_emulation.c: Likewise. * kern/syscall_subr.c: Likewise. * kern/thread_swap.c: Likewise. * kern/time_stamp.c: Likewise. * kern/timer.c: Likewise. * kern/xpr.c: Likewise. * vm/memory_object.c: Likewise. * vm/vm_debug.c: Likewise. * vm/vm_external.c: Likewise. * vm/vm_fault.c: Likewise. * vm/vm_kern.c: Likewise. * vm/vm_map.c: Likewise. * vm/vm_pageout.c: Likewise. * vm/vm_user.c: Likewise. --- ddb/db_sym.c | 64 +++++++++++++++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 33 deletions(-) (limited to 'ddb/db_sym.c') diff --git a/ddb/db_sym.c b/ddb/db_sym.c index 3c8caf49..7d97d15e 100644 --- a/ddb/db_sym.c +++ b/ddb/db_sym.c @@ -55,13 +55,13 @@ db_symtab_t *db_last_symtab; * Add symbol table, with given name, to list of symbol tables. */ boolean_t -db_add_symbol_table(type, start, end, name, ref, map_pointer) - int type; - char *start; - char *end; - char *name; - char *ref; - char *map_pointer; +db_add_symbol_table( + int type, + char *start, + char *end, + char *name, + char *ref, + char *map_pointer) { db_symtab_t *st; extern vm_map_t kernel_map; @@ -119,9 +119,9 @@ db_eqname( const char* src, const char* dst, char c ) } boolean_t -db_value_of_name(name, valuep) - char *name; - db_expr_t *valuep; +db_value_of_name( + char *name, + db_expr_t *valuep) { db_sym_t sym; @@ -141,8 +141,7 @@ db_value_of_name(name, valuep) * otherwise, all symbol tables will be searched. */ db_sym_t -db_lookup(symstr) - char *symstr; +db_lookup(char *symstr) { db_sym_t sp; int i; @@ -193,10 +192,10 @@ db_lookup(symstr) * with parsed file name, symbol name and line number. */ db_sym_t -db_sym_parse_and_lookup(func, symtab, symstr) - db_sym_t (*func)(); - db_symtab_t *symtab; - char *symstr; +db_sym_parse_and_lookup( + db_sym_t (*func)(), + db_symtab_t *symtab, + char *symstr) { char *p; int n; @@ -265,8 +264,7 @@ out: boolean_t db_qualify_ambiguous_names = FALSE; boolean_t -db_name_is_ambiguous(sym_name) - char *sym_name; +db_name_is_ambiguous(char *sym_name) { int i; boolean_t found_once = FALSE; @@ -301,11 +299,11 @@ db_name_is_ambiguous(sym_name) * */ db_sym_t -db_search_task_symbol(val, strategy, offp, task) - db_addr_t val; - db_strategy_t strategy; - db_addr_t *offp; /* better be unsigned */ - task_t task; +db_search_task_symbol( + db_addr_t val, + db_strategy_t strategy, + db_addr_t *offp, /* better be unsigned */ + task_t task) { db_sym_t ret; @@ -330,11 +328,11 @@ db_search_task_symbol(val, strategy, offp, task) } db_sym_t -db_search_in_task_symbol(val, strategy, offp, task) - db_addr_t val; - db_strategy_t strategy; - db_addr_t *offp; - task_t task; +db_search_in_task_symbol( + db_addr_t val, + db_strategy_t strategy, + db_addr_t *offp, + task_t task) { vm_size_t diff; vm_size_t newdiff; @@ -398,11 +396,11 @@ db_search_in_task_symbol(val, strategy, offp, task) * Return name and value of a symbol */ void -db_symbol_values(stab, sym, namep, valuep) - db_symtab_t *stab; - db_sym_t sym; - char **namep; - db_expr_t *valuep; +db_symbol_values( + db_symtab_t *stab, + db_sym_t sym, + char **namep, + db_expr_t *valuep) { db_expr_t value; char *name; -- cgit v1.2.3