From 3a40d47b338500117afba62d3a9db87d4469e26f Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Wed, 20 Jan 1999 06:18:17 +0000 Subject: [PATCH] libnana cleanup git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1648 57a11ea4-9604-0410-9ed3-97b8803252fd --- configure | 26 ++++++++++++-------------- configure.in | 3 +-- src/engine/util.c | 1 + src/engine/util.h | 3 ++- src/gnome/FileBox.c | 2 +- src/register/table-gtk.c | 12 ++++++------ 6 files changed, 23 insertions(+), 24 deletions(-) diff --git a/configure b/configure index bb2a0b5856..4a50964d97 100755 --- a/configure +++ b/configure @@ -2540,17 +2540,16 @@ LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - LIBNANA="-lnana" + LIBS="${LIBS} -lnana" else echo "$ac_t""no" 1>&6 fi - - + ### ------------------------------------------------------------------------------ # If readline exists, just assume that guile needs it. It probably does. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -echo "configure:2554: checking for readline in -lreadline" >&5 +echo "configure:2553: checking for readline in -lreadline" >&5 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2558,7 +2557,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2605,11 +2604,11 @@ fi # results, so one failure makes all further attempts fail. echo $ac_n "checking for guile""... $ac_c" 1>&6 -echo "configure:2609: checking for guile" >&5 +echo "configure:2608: checking for guile" >&5 GNC_LIBS_SAFE=${LIBS} echo $ac_n "checking for guile""... $ac_c" 1>&6 -echo "configure:2613: checking for guile" >&5 +echo "configure:2612: checking for guile" >&5 if eval "test \"`echo '$''{'ac_cv_lib_guile'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2622,14 +2621,14 @@ else else LIBS="${GNC_TEST_LIBS} ${GNC_LIBS_SAFE}" cat > conftest.$ac_ext < int main() { gh_eval_file; ; return 0; } EOF -if { (eval echo configure:2633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* GUILELIBS="${GNC_TEST_LIBS}" else @@ -2656,7 +2655,7 @@ fi ### Plotutils echo $ac_n "checking for openpl in -lplot""... $ac_c" 1>&6 -echo "configure:2660: checking for openpl in -lplot" >&5 +echo "configure:2659: checking for openpl in -lplot" >&5 ac_lib_var=`echo plot'_'openpl | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2664,7 +2663,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lplot $X_PRE_LIBS $MOTIF_LIBS $X_EXTRA_LIBS -lXaw $X_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2931,7 +2930,6 @@ s%@X_LIBS@%$X_LIBS%g s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g s%@XMHTML_TARGET@%$XMHTML_TARGET%g s%@XMHTML_INC@%$XMHTML_INC%g -s%@LIBNANA@%$LIBNANA%g s%@GUILE_INC@%$GUILE_INC%g s%@GUILELIBS@%$GUILELIBS%g s%@HAVE_PLOTUTILS@%$HAVE_PLOTUTILS%g diff --git a/configure.in b/configure.in index ba80b5467b..b9dfa37d95 100644 --- a/configure.in +++ b/configure.in @@ -256,8 +256,7 @@ AC_SUBST(XMHTML_INC) # See if the header file can be found. AC_CHECK_HEADERS(nana.h) AC_CHECK_LIB(nana,L_buffer_create, - LIBNANA="-lnana") -AC_SUBST(LIBNANA) + LIBS="${LIBS} -lnana") ### ------------------------------------------------------------------------------ # If readline exists, just assume that guile needs it. It probably does. diff --git a/src/engine/util.c b/src/engine/util.c index 288a7789ef..a157b5fa30 100644 --- a/src/engine/util.c +++ b/src/engine/util.c @@ -46,6 +46,7 @@ int loglevel[MODULE_MAX] = 2, /* LEDGER */ 2, /* GUI */ 4, /* SCRUB */ + 4, /* GTK_REG */ }; /********************************************************************\ diff --git a/src/engine/util.h b/src/engine/util.h index 70d550d00f..fa9e14ee0a 100644 --- a/src/engine/util.h +++ b/src/engine/util.h @@ -55,7 +55,8 @@ #define MOD_LEDGER 4 #define MOD_GUI 5 #define MOD_SCRUB 6 -#define MODULE_MAX 7 +#define MOD_GTK_REG 7 +#define MODULE_MAX 8 extern int loglevel[MODULE_MAX]; diff --git a/src/gnome/FileBox.c b/src/gnome/FileBox.c index 295514c773..fe3d3efd7e 100644 --- a/src/gnome/FileBox.c +++ b/src/gnome/FileBox.c @@ -64,7 +64,7 @@ void closeBoxCB( GtkWidget mw, gpointer *data ); char * fileBox(const char * title, const char * filter) { - L("STUB: FileBox not implemented for GNOME yet...\n"); + PERR("STUB: FileBox not implemented for GNOME yet...\n"); return NULL; #if 0 diff --git a/src/register/table-gtk.c b/src/register/table-gtk.c index e980fc950b..8924007ac5 100644 --- a/src/register/table-gtk.c +++ b/src/register/table-gtk.c @@ -49,7 +49,7 @@ #include "util.h" /* This static indicates the debugging module that this .o belongs to. */ -static short module = MOD_REGISTER; +static short module = MOD_GTK_REG; /* ==================================================== */ @@ -496,7 +496,7 @@ traverseCB (GtkWidget * mw, gpointer cd, gpointer cb) { static void table_activate_cell_cb(GtkSheet *s, gint row, gint column, gpointer data) { - L("activate_cell %d %d\n", row, column); + PINFO("activate_cell %d %d\n", row, column); @@ -505,12 +505,12 @@ table_activate_cell_cb(GtkSheet *s, gint row, gint column, gpointer data) { static void table_set_cell_cb(GtkSheet *s, gint row, gint column, gpointer data) { - L("set_cell %d %d\n", row, column); + PINFO("set_cell %d %d\n", row, column); } static void table_changed_cb(GtkSheet *s, gint row, gint column, gpointer data) { - L("changed %d %d\n", row, column); + PINFO("changed %d %d\n", row, column); } #if 0 @@ -802,10 +802,10 @@ set_cell_color(GtkSheet *reg, Table *table, guint row, guint col, color.blue = (argb & 0xff) << 8; cmap = gtk_widget_get_colormap(GTK_WIDGET(reg)); - I(cmap); + assert(cmap); success = gdk_color_alloc(cmap, &color); - I(success); + assert(success); { GtkSheetRange range;