mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
add/modify misc debugging messages
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1733 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
f2ab262f3f
commit
2fb0325f8f
@ -35,7 +35,7 @@
|
|||||||
static void qfInsertTextRec( QuickFill *qf, const char * text, int depth );
|
static void qfInsertTextRec( QuickFill *qf, const char * text, int depth );
|
||||||
|
|
||||||
/* This static indicates the debugging module that this .o belongs to. */
|
/* 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 *
|
* Because I can't use C++ for this project, doesn't mean that I *
|
||||||
|
@ -423,7 +423,7 @@ configLayout (SplitRegister *reg)
|
|||||||
}
|
}
|
||||||
/* --------------------------------------------------------- */
|
/* --------------------------------------------------------- */
|
||||||
default:
|
default:
|
||||||
printf ("Internal Error: configLayout(): "
|
PERR ("configLayout(): "
|
||||||
"unknown register type %d \n", type);
|
"unknown register type %d \n", type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -221,8 +221,10 @@ xaccTableResize (Table * table,
|
|||||||
if (!table) return;
|
if (!table) return;
|
||||||
if ((new_phys_rows < new_virt_rows) ||
|
if ((new_phys_rows < new_virt_rows) ||
|
||||||
(new_phys_cols < new_virt_cols)) {
|
(new_phys_cols < new_virt_cols)) {
|
||||||
printf ("Internal Error: xaccTableResize(): the number of "
|
FATAL ("xaccTableResize(): the number of physical rows (%d %d)"
|
||||||
"physical rows must equal or exceed the number of virtual rows \n");
|
"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);
|
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;
|
int new_virt_row, new_virt_col;
|
||||||
CellBlock *curs;
|
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.
|
/* Change the cell background colors to thier "passive" values.
|
||||||
* This denotes that the cursor has left this location (which means more or
|
* 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.")
|
* 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;
|
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];
|
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 */
|
/* OK, if there is a callback for this cell, call it */
|
||||||
enter = arr->cells[rel_row][rel_col]->enter_cell;
|
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) {
|
if (enter) {
|
||||||
const char *val;
|
const char *val;
|
||||||
char *retval;
|
char *retval;
|
||||||
|
|
||||||
printf("has enter handler");
|
PINFO("has enter handler");
|
||||||
|
|
||||||
val = table->entries[row][col];
|
val = table->entries[row][col];
|
||||||
retval = (char *) enter(arr->cells[rel_row][rel_col], val);
|
retval = (char *) enter(arr->cells[rel_row][rel_col], val);
|
||||||
@ -893,7 +899,7 @@ gnc_table_enter_update(Table *table,
|
|||||||
*new_text = retval;
|
*new_text = retval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf(")\n");
|
PINFO(")\n");
|
||||||
|
|
||||||
/* record this position as the cell that will be
|
/* record this position as the cell that will be
|
||||||
* traversed out of if a traverse even happens */
|
* traversed out of if a traverse even happens */
|
||||||
|
@ -60,6 +60,10 @@
|
|||||||
#include "cellblock.h"
|
#include "cellblock.h"
|
||||||
#include "table-allgui.h"
|
#include "table-allgui.h"
|
||||||
#include "table-html.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");
|
fh = fdopen (fd, "a");
|
||||||
if (!fh) {
|
if (!fh) {
|
||||||
int norr = errno;
|
int norr = errno;
|
||||||
printf ("Error: xaccTableDumpHTML(): can't open fd=%d \n", fd);
|
PERR ("xaccTableDumpHTML(): can't open fd=%d \n"
|
||||||
printf ("(%d) %s \n", norr, strerror (norr));
|
"\t(%d) %s \n", fd, norr, strerror (norr));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,8 +156,8 @@ xaccTablePrintHTML (Table * table, char *filename)
|
|||||||
fd = open (filename, O_CREAT | O_APPEND | O_WRONLY, S_IRUSR | S_IWUSR);
|
fd = open (filename, O_CREAT | O_APPEND | O_WRONLY, S_IRUSR | S_IWUSR);
|
||||||
if (0 > fd) {
|
if (0 > fd) {
|
||||||
int norr = errno;
|
int norr = errno;
|
||||||
printf ("Error: xaccTablePrintHTML(): can't open file %s\n", filename);
|
PERR ("xaccTablePrintHTML(): can't open file %s\n"
|
||||||
printf ("(%d) %s \n", norr, strerror (norr));
|
"\t(%d) %s\n", filename, norr, strerror (norr));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
cnt = xaccTableDumpHTML (table, fd);
|
cnt = xaccTableDumpHTML (table, fd);
|
||||||
@ -168,8 +172,8 @@ xaccTablePrintHTML (Table * table, char *filename)
|
|||||||
#define CHKERR(val, msg) { \
|
#define CHKERR(val, msg) { \
|
||||||
if (0 > val) { \
|
if (0 > val) { \
|
||||||
int norr = errno; \
|
int norr = errno; \
|
||||||
printf ("Error: xaccTableWebServeHTML(): " msg "\n"); \
|
PERR ("Error: xaccTableWebServeHTML(): " msg "\n" \
|
||||||
printf ("(%d) %s \n", norr, strerror (norr)); \
|
"(%d) %s \n", norr, strerror (norr)); \
|
||||||
if (pid) return; \
|
if (pid) return; \
|
||||||
exit (0); \
|
exit (0); \
|
||||||
} \
|
} \
|
||||||
|
Loading…
Reference in New Issue
Block a user