Remove unused guile references in various source files

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22642 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Geert Janssens 2012-12-12 17:43:18 +00:00
parent a9a6d3677d
commit 47778a8325
32 changed files with 4 additions and 287 deletions

View File

@ -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

View File

@ -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)"

View File

@ -1,183 +0,0 @@
/* Copyright (C) 1995,1996,1997,1998, 1999, 2000 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* As a special exception, the Free Software Foundation gives permission
* for additional uses of the text contained in its release of GUILE.
*
* The exception is that, if you link the GUILE library with other files
* to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the GUILE library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the
* Free Software Foundation under the name GUILE. If you copy
* code from other Free Software Foundation releases into a copy of
* GUILE, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for GUILE, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
/* Software engineering face-lift by Greg J. Badros, 11-Dec-1999,
gjb@cs.washington.edu, http://www.cs.washington.edu/homes/gjb */
#include <stdio.h>
#include "libguile/__scm.h"
#include "libguile.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
# ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
# endif
# ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
# else
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# ifdef HAVE_TIME_H
# include <time.h>
# endif
# endif
# endif
#ifdef HAVE_SYS_TIMES_H
# include <sys/times.h>
#endif
#ifdef HAVE_SYS_TIMEB_H
# include <sys/timeb.h>
#endif
#ifndef tzname /* For SGI. */
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
#endif
#ifdef MISSING_STRPTIME_DECL
extern char *strptime ();
#endif
/* This should be figured out by autoconf. */
#if ! defined(CLKTCK) && defined(CLK_TCK)
# define CLKTCK CLK_TCK
#endif
#if ! defined(CLKTCK) && defined(CLOCKS_PER_SEC)
# define CLKTCK CLOCKS_PER_SEC
#endif
#if ! defined(CLKTCK)
# define CLKTCK 60
#endif
#include "strptime.h"
#ifdef __STDC__
# define timet time_t
#else
# define timet long
#endif
static SCM
filltime (struct tm *bd_time, int zoff, char *zname);
static SCM
filltime (struct tm *bd_time, int zoff, char *zname)
{
SCM result = scm_make_vector (SCM_MAKINUM(11), SCM_UNDEFINED);
SCM_VELTS (result)[0] = SCM_MAKINUM (bd_time->tm_sec);
SCM_VELTS (result)[1] = SCM_MAKINUM (bd_time->tm_min);
SCM_VELTS (result)[2] = SCM_MAKINUM (bd_time->tm_hour);
SCM_VELTS (result)[3] = SCM_MAKINUM (bd_time->tm_mday);
SCM_VELTS (result)[4] = SCM_MAKINUM (bd_time->tm_mon);
SCM_VELTS (result)[5] = SCM_MAKINUM (bd_time->tm_year);
SCM_VELTS (result)[6] = SCM_MAKINUM (bd_time->tm_wday);
SCM_VELTS (result)[7] = SCM_MAKINUM (bd_time->tm_yday);
SCM_VELTS (result)[8] = SCM_MAKINUM (bd_time->tm_isdst);
SCM_VELTS (result)[9] = SCM_MAKINUM (zoff);
SCM_VELTS (result)[10] = zname ? scm_makfrom0str (zname) : SCM_BOOL_F;
return result;
}
#ifndef HAVE_STRPTIME
SCM_DEFINE (scm_strptime, "strptime", 2, 0, 0,
(SCM format, SCM string),
"Performs the reverse action to @code{strftime}, parsing @var{string}\n"
"according to the specification supplied in @var{template}. The\n"
"interpretation of month and day names is dependent on the current\n"
"locale. The\n"
"value returned is a pair. The CAR has an object with time components \n"
"in the form returned by @code{localtime} or @code{gmtime},\n"
"but the time zone components\n"
"are not usefully set.\n"
"The CDR reports the number of characters from @var{string} which\n"
"vwere used for the conversion.")
#define FUNC_NAME s_scm_strptime
{
struct tm t;
char *fmt, *str, *rest;
SCM_VALIDATE_ROSTRING (1, format);
SCM_VALIDATE_ROSTRING (2, string);
SCM_COERCE_SUBSTR (format);
SCM_COERCE_SUBSTR (string);
fmt = SCM_ROCHARS (format);
str = SCM_ROCHARS (string);
/* initialize the struct tm */
#define tm_init(field) t.field = 0
tm_init (tm_sec);
tm_init (tm_min);
tm_init (tm_hour);
tm_init (tm_mday);
tm_init (tm_mon);
tm_init (tm_year);
tm_init (tm_wday);
tm_init (tm_yday);
#undef tm_init
t.tm_isdst = -1;
SCM_DEFER_INTS;
if ((rest = strptime (str, fmt, &t)) == NULL)
SCM_SYSERROR;
SCM_ALLOW_INTS;
return scm_cons (filltime (&t, 0, NULL), SCM_MAKINUM (rest - str));
}
#undef FUNC_NAME
#endif /* HAVE_STRPTIME */
/*
Local Variables:
c-file-style: "gnu"
End:
*/

View File

@ -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;

View File

@ -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);
}

View File

@ -2,7 +2,6 @@
#include <glib.h>
#include <glib/gstdio.h>
#include <libguile.h>
#include <stdlib.h>
#include <unistd.h>

View File

@ -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 = \
@ -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}

View File

@ -25,7 +25,6 @@
#include <glib.h>
#include <glib/gi18n.h>
#include <libguile.h>
#include "Account.h"
#include "account-quickfill.h"

View File

@ -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}
@ -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
@ -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)

View File

@ -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"

View File

@ -28,7 +28,6 @@
#include <gtk/gtk.h>
#include <gmodule.h>
#include <libguile.h>
#include "gnc-module.h"
#include "gnc-module-api.h"

View File

@ -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"

View File

@ -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>

View File

@ -24,7 +24,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libguile.h>
#include "dialog-new-user.h"
#include "dialog-utils.h"

View File

@ -33,7 +33,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <stdio.h>
#include <libguile.h>
#include <locale.h>
#include <math.h>

View File

@ -24,8 +24,6 @@
#ifndef DIALOG_PRINT_CHECK_H
#define DIALOG_PRINT_CHECK_H
#include <libguile.h>
#include "print-session.h"
typedef struct _print_check_dialog PrintCheckDialog;

View File

@ -59,7 +59,6 @@
#include "gnc-ui.h"
#include "gnc-ui-util.h"
#include "option-util.h"
#include "libguile.h"
#include "gnc-main-window.h"
#include "gnc-component-manager.h"

View File

@ -52,7 +52,6 @@
#include "gnucash-sheet.h"
#include "table-allgui.h"
#include <libguile.h>
#include "dialog-utils.h"
// static QofLogModule log_module = GNC_MOD_SX;

View File

@ -55,7 +55,6 @@
#include "gnc-tree-view-split-reg.h"
#include <libguile.h>
#include "dialog-utils.h"
#define GCONF_SECTION "window/pages/register2"

View File

@ -38,7 +38,6 @@
#include <fcntl.h>
#include <unistd.h>
#include <regex.h>
#include <libguile.h>
#include "Account.h"
#include "print-session.h"

View File

@ -12,7 +12,6 @@ INCLUDE_DIRECTORIES (${GLIB2_INCLUDE_DIRS})
INCLUDE_DIRECTORIES (${GCONF2_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}/lib/libc) # for pow.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src ) # for gnc-ui.h

View File

@ -63,7 +63,6 @@ AM_CPPFLAGS = \
-I${top_srcdir}/src/gnome-utils \
-I${top_srcdir}/src/libqof/qof \
${GCONF_CFLAGS} \
${GUILE_INCS} \
${GTK_CFLAGS} \
${GLIB_CFLAGS}

View File

@ -6,7 +6,6 @@
#include "config.h"
#include <gmodule.h>
#include <libguile.h>
#include <glib/gi18n.h>
#include "dialog-preferences.h"
@ -24,8 +23,6 @@ int libgncmod_generic_import_gnc_module_current = 0;
int libgncmod_generic_import_gnc_module_revision = 0;
int libgncmod_generic_import_gnc_module_age = 0;
/*static GNCModule engine; NOTUSED */
char *
libgncmod_generic_import_gnc_module_path(void)
{

View File

@ -35,7 +35,6 @@ AM_CPPFLAGS = \
-I${top_srcdir}/src/import-export \
-I${top_srcdir}/src/libqof/qof \
${GCONF_CFLAGS} \
${GUILE_INCS} \
${GTK_CFLAGS} \
${GLIB_CFLAGS}

View File

@ -30,7 +30,6 @@
#include <glib/gstdio.h>
#include <string.h>
#include <sys/time.h>
#include <libguile.h>
#include <errno.h>
#include "Account.h"

View File

@ -26,7 +26,6 @@
#include "config.h"
#include <gmodule.h>
#include <libguile.h>
#include "gnc-log-replay.h"
#include "gnc-module.h"

View File

@ -37,7 +37,6 @@ AM_CPPFLAGS = \
-I${top_srcdir}/src/import-export \
-I${top_srcdir}/src/libqof/qof \
${GCONF_CFLAGS} \
${GUILE_INCS} \
${GTK_CFLAGS} \
${GLIB_CFLAGS} \
${LIBOFX_CFLAGS}

View File

@ -30,7 +30,6 @@
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <libguile.h>
#include <math.h>
#include <libofx/libofx.h>

View File

@ -31,7 +31,6 @@
#include <gmodule.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <libguile.h>
#include "gnc-hooks.h"
#include "gnc-module.h"

View File

@ -7,7 +7,6 @@
#include "config.h"
#include <gmodule.h>
#include <libguile.h>
#include "gnc-module.h"
#include "gnc-module-api.h"

View File

@ -62,7 +62,6 @@ AM_CPPFLAGS = \
-I${top_srcdir}/src/register/ledger-core \
-I${top_srcdir}/src/register/register-core \
-I${top_srcdir}/src/libqof/qof \
${GUILE_INCS} \
${GLIB_CFLAGS} \
${GCONF_CFLAGS} \
${GTK_XIM_FLAGS} \

View File

@ -39,7 +39,6 @@
#include "config.h"
#include <libguile.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>