Skip to content

Commit

Permalink
Remove unused guile references in various source files
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22642 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
gjanssens committed Dec 12, 2012
1 parent a9a6d36 commit 47778a8
Show file tree
Hide file tree
Showing 32 changed files with 4 additions and 287 deletions.
2 changes: 0 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1055,8 +1055,6 @@ case $host_os in
;;
esac

#AC_REPLACE_FUNCS(scm_strptime)

if test x$am_cv_val_LC_MESSAGES = "xno"; then
LC_MESSAGES_ENUM="LC_ALL"
else
Expand Down
4 changes: 0 additions & 4 deletions lib/libc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ if OS_WIN32
AM_CPPFLAGS = -DOS_WIN32
endif

# Not currently used. If added to AC_REPLACE_FUNCS then this line
# should be removed.
EXTRA_DIST = scm_strptime.c

print_libobjs: Makefile
@echo "LIBOBJS = $(LIBOBJS)"
@echo "LTLIBOBJS = $(LTLIBOBJS)"
183 changes: 0 additions & 183 deletions lib/libc/scm_strptime.c

This file was deleted.

13 changes: 0 additions & 13 deletions src/backend/xml/sixtp-dom-generators.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,21 +226,8 @@ gchar*
double_to_string(double value)
{
gchar *numstr;
#ifdef USE_GUILE_FOR_DOUBLE_CONVERSION
numstr = gh_scm2newstr(scm_call_1(scm_c_eval_string("number->string"),
scm_make_real(value)),
NULL);

#else /* don't USE_GUILE_FOR_DOUBLE_CONVERSION */
/*
* we're just going to use plain-old libc for the double conversion.
* There was some question as to whether libc is accurate enough
* in its printf function for doubles, but I don't understand
* how it couldn't be ...
*/
numstr = g_strdup_printf ("%24.18g", value);

#endif /* USE_GUILE_FOR_DOUBLE_CONVERSION */
if (!numstr)
{
return NULL;
Expand Down
56 changes: 4 additions & 52 deletions src/backend/xml/sixtp-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,66 +141,18 @@ concatenate_child_result_chars(GSList *data_from_children)

/*********/
/* double
RLB writes:
We have to use guile because AFAICT, libc, and C in general isn't
smart enough to actually parse it's own output, especially not
portably (big surprise).
Linas writes:
I don't understand the claim; I'm just going to use
atof or strtod to accomplish this.
RLB writes: FIXME: OK, but at the very least this may cause a
locale dependency. Whoever fixes that, please delete this whole
comment block.
*/

gboolean
string_to_double(const char *str, double *result)
{
char *endptr = 0x0;

g_return_val_if_fail(str, FALSE);
g_return_val_if_fail(result, FALSE);

#ifdef USE_GUILE_FOR_DOUBLE_CONVERSION
{
/* FIXME: NOT THREAD SAFE - USES STATIC DATA */
static SCM string_to_number;
static gboolean ready = FALSE;

SCM conversion_result;

if (!ready)
{
string_to_number = scm_c_eval_string("string->number");
scm_gc_protect_object(string_to_number);
ready = TRUE;
}

conversion_result = scm_call_1(string_to_number, scm_makfrom0str(str));
if (!conversion_result == SCM_BOOL_F)
{
return(FALSE);
}

*result = scm_num2dbl(conversion_result, G_STRFUNC);
}

#else /* don't USE_GUILE_FOR_DOUBLE_CONVERSION */
{
char *endptr = 0x0;

/* We're just going to use plain-old libc for the double conversion.
* There was some question as to whether libc is accurate enough
* in its printf function for doubles, but I don't understand
* how it couldn't be ...
*/

*result = strtod (str, &endptr);
if (endptr == str) return (FALSE);
}
#endif /* USE_GUILE_FOR_DOUBLE_CONVERSION */
*result = strtod (str, &endptr);
if (endptr == str) return (FALSE);

return(TRUE);
}
Expand Down
1 change: 0 additions & 1 deletion src/backend/xml/test/test-xml-commodity.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include <glib.h>
#include <glib/gstdio.h>
#include <libguile.h>
#include <stdlib.h>
#include <unistd.h>

Expand Down
2 changes: 0 additions & 2 deletions src/business/business-ledger/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ libgnc_business_ledger_la_LIBADD = \
${top_builddir}/src/core-utils/libgnc-core-utils.la \
${top_builddir}/src/libqof/qof/libgnc-qof.la \
${GTK_LIBS} \
${GUILE_LIBS} \
${GLIB_LIBS}

AM_CPPFLAGS = \
Expand All @@ -38,7 +37,6 @@ AM_CPPFLAGS = \
-I${top_srcdir}/src/gnome-utils \
-I${top_srcdir}/src/register/register-core \
-I${top_srcdir}/src/libqof/qof \
${GUILE_INCS} \
${GCONF_CFLAGS} \
${GTK_CFLAGS} \
${GLIB_CFLAGS}
Expand Down
1 change: 0 additions & 1 deletion src/business/business-ledger/gncEntryLedgerLoad.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include <glib.h>
#include <glib/gi18n.h>
#include <libguile.h>

#include "Account.h"
#include "account-quickfill.h"
Expand Down
3 changes: 0 additions & 3 deletions src/gnc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ LINK_DIRECTORIES (${GLIB2_LIBRARY_DIRS}
${GOBJECT_LIBRARY_DIRS}
${GTHREAD_LIBRARY_DIRS}
${GCONF2_LIBRARY_DIRS}
${GUILE_LIBRARY_DIRS}
${GLIBMM_LIBRARY_DIRS}
# ${GWENHYWFAR_LIBRARY_DIRS}
# ${AQBANKING_LIBRARY_DIRS}
Expand Down Expand Up @@ -81,7 +80,6 @@ INCLUDE_DIRECTORIES (${GLIB2_INCLUDE_DIRS})
INCLUDE_DIRECTORIES (${GLIBMM_INCLUDE_DIRS})
INCLUDE_DIRECTORIES (${LIBINTL_INCLUDE_PATH})
INCLUDE_DIRECTORIES (${REGEX_INCLUDE_PATH})
INCLUDE_DIRECTORIES (${GUILE_INCLUDE_DIRS})
INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}/src ) # for config.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src ) # for gnc-ui.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/libqof/qof) # for qof.h
Expand Down Expand Up @@ -121,7 +119,6 @@ TARGET_LINK_LIBRARIES (cutecash engine gnc-module core-utils qof)
TARGET_LINK_LIBRARIES (cutecash ${GLIBMM_LIBRARIES})
TARGET_LINK_LIBRARIES (cutecash ${GCONF2_LIBRARIES})
TARGET_LINK_LIBRARIES (cutecash ${GTHREAD_LIBRARIES} ${GOBJECT_LIBRARIES} ${GMODULE_LIBRARIES} ${GLIB2_LIBRARIES})
TARGET_LINK_LIBRARIES (cutecash ${GUILE_LIBRARIES})
TARGET_LINK_LIBRARIES (cutecash ${LIBXML2_LIBRARIES})
TARGET_LINK_LIBRARIES (cutecash ${ZLIB_LIBRARIES})
IF (WIN32)
Expand Down
1 change: 0 additions & 1 deletion src/gnc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <libguile.h>
#include <glib/gi18n.h>
#include <glib.h>
extern "C"
Expand Down
1 change: 0 additions & 1 deletion src/gnome-search/gncmod-gnome-search.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

#include <gtk/gtk.h>
#include <gmodule.h>
#include <libguile.h>

#include "gnc-module.h"
#include "gnc-module-api.h"
Expand Down
1 change: 0 additions & 1 deletion src/gnome-utils/gnc-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <errno.h>
#include <libguile.h>
#include <string.h>

#include "dialog-utils.h"
Expand Down
1 change: 0 additions & 1 deletion src/gnome-utils/gnc-gnome-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "config.h"

#include <glib/gi18n.h>
#include <libguile.h>
#include <gconf/gconf.h>
#ifdef HAVE_X11_XLIB_H
# include <X11/Xlib.h>
Expand Down
1 change: 0 additions & 1 deletion src/gnome/dialog-new-user.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libguile.h>

#include "dialog-new-user.h"
#include "dialog-utils.h"
Expand Down
Loading

0 comments on commit 47778a8

Please sign in to comment.