diff --git a/src/register/QuickFill.c b/src/register/QuickFill.c index 2354fbb2c4..515563ed28 100644 --- a/src/register/QuickFill.c +++ b/src/register/QuickFill.c @@ -35,7 +35,7 @@ static void qfInsertTextRec( QuickFill *qf, const char * text, int depth ); /* This static indicates the debugging module that this .o belongs to. */ -static short module = MOD_LEDGER; +static short module = MOD_REGISTER; /********************************************************************\ * Because I can't use C++ for this project, doesn't mean that I * diff --git a/src/register/splitreg.c b/src/register/splitreg.c index 7f4e1c9630..364f78e8b5 100644 --- a/src/register/splitreg.c +++ b/src/register/splitreg.c @@ -423,7 +423,7 @@ configLayout (SplitRegister *reg) } /* --------------------------------------------------------- */ default: - printf ("Internal Error: configLayout(): " + PERR ("configLayout(): " "unknown register type %d \n", type); break; } diff --git a/src/register/table-allgui.c b/src/register/table-allgui.c index ee1edee08f..f193f49437 100644 --- a/src/register/table-allgui.c +++ b/src/register/table-allgui.c @@ -221,8 +221,10 @@ xaccTableResize (Table * table, if (!table) return; if ((new_phys_rows < new_virt_rows) || (new_phys_cols < new_virt_cols)) { - printf ("Internal Error: xaccTableResize(): the number of " - "physical rows must equal or exceed the number of virtual rows \n"); + FATAL ("xaccTableResize(): the number of physical rows (%d %d)" + "must equal or exceed the number of virtual rows (%d %d)\n", + new_phys_rows, new_phys_cols, + new_virt_rows, new_virt_cols); exit (1); } @@ -404,6 +406,8 @@ doMoveCursor (Table *table, int new_phys_row, int new_phys_col, int do_move_gui) int new_virt_row, new_virt_col; CellBlock *curs; + ENTER("doMoveCursor(): new_phys=(%d %d) do_move_gui=%d\n", + new_phys_row, new_phys_col, do_move_gui); /* Change the cell background colors to thier "passive" values. * This denotes that the cursor has left this location (which means more or * less the same thing as "the current location is no longer being edited.") @@ -464,6 +468,7 @@ doMoveCursor (Table *table, int new_phys_row, int new_phys_col, int do_move_gui) } } } + LEAVE("doMoveCursor(): out of bounds\n"); return; } @@ -535,6 +540,7 @@ doMoveCursor (Table *table, int new_phys_row, int new_phys_col, int do_move_gui) } curs->user_data = table->user_data[new_virt_row][new_virt_col]; + LEAVE("doMoveCursor(): did move\n"); } /* ==================================================== */ @@ -875,13 +881,13 @@ gnc_table_enter_update(Table *table, /* OK, if there is a callback for this cell, call it */ enter = arr->cells[rel_row][rel_col]->enter_cell; - printf("ENTER: %d %d == (", rel_row, rel_col); + PINFO("table: ENTER: %d %d == (", rel_row, rel_col); if (enter) { const char *val; char *retval; - printf("has enter handler"); + PINFO("has enter handler"); val = table->entries[row][col]; retval = (char *) enter(arr->cells[rel_row][rel_col], val); @@ -893,7 +899,7 @@ gnc_table_enter_update(Table *table, *new_text = retval; } } - printf(")\n"); + PINFO(")\n"); /* record this position as the cell that will be * traversed out of if a traverse even happens */ diff --git a/src/register/table-html.c b/src/register/table-html.c index 339e28fc72..572bbb40f7 100644 --- a/src/register/table-html.c +++ b/src/register/table-html.c @@ -60,6 +60,10 @@ #include "cellblock.h" #include "table-allgui.h" #include "table-html.h" +#include "util.h" + +/* This static indicates the debugging module that this .o belongs to. */ +static short module = MOD_REGISTER; /* ==================================================== */ @@ -85,8 +89,8 @@ xaccTableDumpHTML (Table * table, int fd) fh = fdopen (fd, "a"); if (!fh) { int norr = errno; - printf ("Error: xaccTableDumpHTML(): can't open fd=%d \n", fd); - printf ("(%d) %s \n", norr, strerror (norr)); + PERR ("xaccTableDumpHTML(): can't open fd=%d \n" + "\t(%d) %s \n", fd, norr, strerror (norr)); return 0; } @@ -152,8 +156,8 @@ xaccTablePrintHTML (Table * table, char *filename) fd = open (filename, O_CREAT | O_APPEND | O_WRONLY, S_IRUSR | S_IWUSR); if (0 > fd) { int norr = errno; - printf ("Error: xaccTablePrintHTML(): can't open file %s\n", filename); - printf ("(%d) %s \n", norr, strerror (norr)); + PERR ("xaccTablePrintHTML(): can't open file %s\n" + "\t(%d) %s\n", filename, norr, strerror (norr)); return 0; } cnt = xaccTableDumpHTML (table, fd); @@ -168,8 +172,8 @@ xaccTablePrintHTML (Table * table, char *filename) #define CHKERR(val, msg) { \ if (0 > val) { \ int norr = errno; \ - printf ("Error: xaccTableWebServeHTML(): " msg "\n"); \ - printf ("(%d) %s \n", norr, strerror (norr)); \ + PERR ("Error: xaccTableWebServeHTML(): " msg "\n" \ + "(%d) %s \n", norr, strerror (norr)); \ if (pid) return; \ exit (0); \ } \