mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Assorted `syntax-check' fixes.
* doc/ref/Makefile.am ($(snarf_doc).am): Untabify. * libguile/eval.c: Remove unnecessary <assert.h> inclusion. * .x-sc_m4_quote_check: Update. * libguile/error.c (scm_error_scm): Use `EXIT_FAILURE' instead of 1. * libguile/init.c (fixconfig, scm_boot_guile): Likewise. * libguile/null-threads.h (scm_i_pthread_exit): Likewise. * libguile/script.c (scm_compile_shell_switches): Likewise. * test-suite/standalone/test-conversion.c: Likewise. * test-suite/standalone/test-list.c: Likewise. * test-suite/standalone/test-unwind.c: Likewise. * libguile/async.c: Remove unnecessary inclusion of <signal.h>. * NEWS: "filesystem" -> "file system". * doc/ref/r6rs.texi: Ditto. * cfg.mk (local-checks-to-skip): New variable. * .x-sc_m4_quote_check, .x-sc_obsolete_symbols, .x-sc_program_name, .x-sc_prohibit_atoi_atof, .x-sc_prohibit_magic_number_exit: New files. * .gitignore: Update.
This commit is contained in:
parent
172988eeb4
commit
93003b16b0
19 changed files with 96 additions and 67 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -136,3 +136,4 @@ INSTALL
|
|||
/lib/unistr.h
|
||||
/lib/unitypes.h
|
||||
/lib/c++defs.h
|
||||
/.sc-start-*
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
m4/version-etc.m4
|
||||
m4/absolute-header.m4
|
||||
m4/*
|
||||
|
|
4
.x-sc_obsolete_symbols
Normal file
4
.x-sc_obsolete_symbols
Normal file
|
@ -0,0 +1,4 @@
|
|||
doc/*
|
||||
lib/flock.c
|
||||
libguile/filesys.c
|
||||
libguile/ChangeLog-2008
|
5
.x-sc_program_name
Normal file
5
.x-sc_program_name
Normal file
|
@ -0,0 +1,5 @@
|
|||
test-suite/*
|
||||
examples/*
|
||||
doc/example-smob/*
|
||||
libguile/gen-scmconfig.c
|
||||
*
|
2
.x-sc_prohibit_atoi_atof
Normal file
2
.x-sc_prohibit_atoi_atof
Normal file
|
@ -0,0 +1,2 @@
|
|||
lib/*
|
||||
libguile/win32-socket.c
|
4
.x-sc_prohibit_magic_number_exit
Normal file
4
.x-sc_prohibit_magic_number_exit
Normal file
|
@ -0,0 +1,4 @@
|
|||
configure.ac
|
||||
NEWS
|
||||
doc/ref/api-init.texi
|
||||
libguile/ChangeLog*
|
4
NEWS
4
NEWS
|
@ -154,11 +154,11 @@ on chance.
|
|||
** Remove encoding of versions into the file system
|
||||
|
||||
It used to be that, when loading a module, if the user specified a
|
||||
version, Guile would grovel about in the filesystem to find the
|
||||
version, Guile would grovel about in the file system to find the
|
||||
module. This process was slow and not robust. This support has been
|
||||
removed: modules are once more always loaded via `primitive-load-path'.
|
||||
|
||||
Module versions in the filesystem may be added again in the future, in
|
||||
Module versions in the file system may be added again in the future, in
|
||||
an extensible way. Contact bug-guile@gnu.org with patches.
|
||||
|
||||
** Alex Shinn's pattern matcher for (ice-9 match).
|
||||
|
|
8
cfg.mk
8
cfg.mk
|
@ -1,3 +1,11 @@
|
|||
old_NEWS_hash = d41d8cd98f00b204e9800998ecf8427e
|
||||
git-version-gen-tag-sed-script := \
|
||||
's/^release_\([0-9]\+\)-\([0-9]\+\)-\([0-9]\+\)/v\1.\2\.\3/g'
|
||||
|
||||
local-checks-to-skip := \
|
||||
sc_makefile_at_at_check \
|
||||
sc_prohibit_HAVE_MBRTOWC \
|
||||
sc_prohibit_empty_lines_at_EOF \
|
||||
sc_prohibit_have_config_h \
|
||||
sc_prohibit_safe_read_without_use \
|
||||
sc_prohibit_stat_st_blocks
|
||||
|
|
|
@ -1442,7 +1442,7 @@ library. @xref{Writing}, for documentation.
|
|||
|
||||
The @code{(rnrs files (6))} library provides the @code{file-exists?} and
|
||||
@code{delete-file} procedures, which test for the existence of a file
|
||||
and allow the deletion of files from the filesystem, respectively.
|
||||
and allow the deletion of files from the file system, respectively.
|
||||
|
||||
These procedures are identical to the ones provided by Guile's core
|
||||
library. @xref{File System}, for documentation.
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
#define SCM_BUILDING_DEPRECATED_CODE
|
||||
|
||||
#include <signal.h>
|
||||
#include "libguile/_scm.h"
|
||||
#include "libguile/eval.h"
|
||||
#include "libguile/throw.h"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2004, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2004, 2006, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
|
@ -23,6 +23,7 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
|
@ -94,7 +95,7 @@ SCM_DEFINE (scm_error_scm, "scm-error", 5, 0, 0,
|
|||
|
||||
/* No return, but just in case: */
|
||||
fprintf (stderr, "Guile scm_ithrow returned!\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#endif
|
||||
|
||||
#include <alloca.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "libguile/__scm.h"
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -160,7 +161,7 @@ fixconfig (char *s1, char *s2, int s)
|
|||
fputs ("\nin ", stderr);
|
||||
fputs (s ? "setjump" : "scmfig", stderr);
|
||||
fputs (".h and recompile scm\n", stderr);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -326,8 +327,8 @@ static void *invoke_main_func(void *body_data);
|
|||
Call MAIN_FUNC, passing it CLOSURE, ARGC, and ARGV. MAIN_FUNC
|
||||
should do all the work of the program (initializing other packages,
|
||||
reading user input, etc.) before returning. When MAIN_FUNC
|
||||
returns, call exit (0); this function never returns. If you want
|
||||
some other exit value, MAIN_FUNC may call exit itself.
|
||||
returns, call exit (EXIT_FAILURE); this function never returns.
|
||||
If you want some other exit value, MAIN_FUNC may call exit itself.
|
||||
|
||||
scm_boot_guile arranges for program-arguments to return the strings
|
||||
given by ARGC and ARGV. If MAIN_FUNC modifies ARGC/ARGV, should
|
||||
|
@ -368,7 +369,7 @@ scm_boot_guile (int argc, char ** argv, void (*main_func) (), void *closure)
|
|||
if (res == NULL)
|
||||
exit (EXIT_FAILURE);
|
||||
else
|
||||
exit (0);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void *
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#ifndef SCM_NULL_THREADS_H
|
||||
#define SCM_NULL_THREADS_H
|
||||
|
||||
/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2005, 2006, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
|
@ -33,6 +33,7 @@
|
|||
goal.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* Threads
|
||||
|
@ -41,7 +42,7 @@
|
|||
#define scm_i_pthread_self() 0
|
||||
#define scm_i_pthread_create(t,a,f,d) (*(t)=0, (void)(f), ENOSYS)
|
||||
#define scm_i_pthread_detach(t) do { } while (0)
|
||||
#define scm_i_pthread_exit(v) exit(0)
|
||||
#define scm_i_pthread_exit(v) exit (EXIT_SUCCESS)
|
||||
#define scm_i_pthread_cancel(t) 0
|
||||
#define scm_i_pthread_cleanup_push(t,v) 0
|
||||
#define scm_i_pthread_cleanup_pop(e) 0
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
|
@ -643,7 +644,7 @@ scm_compile_shell_switches (int argc, char **argv)
|
|||
|| ! strcmp (argv[i], "--help"))
|
||||
{
|
||||
scm_shell_usage (0, 0);
|
||||
exit (0);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
else if (! strcmp (argv[i], "-v")
|
||||
|
@ -653,7 +654,7 @@ scm_compile_shell_switches (int argc, char **argv)
|
|||
version_etc (stdout, scm_usage_name, PACKAGE_NAME, PACKAGE_VERSION,
|
||||
/* XXX: Use gettext for the string below. */
|
||||
"the Guile developers", NULL);
|
||||
exit (0);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
else
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include <libguile.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -50,7 +51,7 @@ test_1 (const char *str, scm_t_intmax min, scm_t_intmax max,
|
|||
fprintf (stderr, "fail: scm_is_signed_integer (%s, "
|
||||
"%" PRIiMAX ", %" PRIiMAX ") == %d\n",
|
||||
str, min, max, result);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,7 +137,7 @@ test_2 (const char *str, scm_t_uintmax min, scm_t_uintmax max,
|
|||
fprintf (stderr, "fail: scm_is_unsigned_integer (%s, "
|
||||
"%" PRIuMAX ", %" PRIuMAX ") == %d\n",
|
||||
str, min, max, result);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -257,7 +258,7 @@ test_3 (const char *str, scm_t_intmax min, scm_t_intmax max,
|
|||
"fail: scm_to_signed_int (%s, "
|
||||
"%" PRIiMAX ", %" PRIiMAX ") -> out of range\n",
|
||||
str, min, max);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if (type_error)
|
||||
|
@ -270,7 +271,7 @@ test_3 (const char *str, scm_t_intmax min, scm_t_intmax max,
|
|||
"fail: scm_to_signed_int (%s, "
|
||||
"%" PRIiMAX", %" PRIiMAX ") -> wrong type\n",
|
||||
str, min, max);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -284,7 +285,7 @@ test_3 (const char *str, scm_t_intmax min, scm_t_intmax max,
|
|||
"fail: scm_to_signed_int (%s, "
|
||||
"%" PRIiMAX ", %" PRIiMAX ") = %" PRIiMAX "\n",
|
||||
str, min, max, result);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -392,7 +393,7 @@ test_4 (const char *str, scm_t_uintmax min, scm_t_uintmax max,
|
|||
"fail: scm_to_unsigned_int (%s, "
|
||||
"%" PRIuMAX ", %" PRIuMAX ") -> out of range\n",
|
||||
str, min, max);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if (type_error)
|
||||
|
@ -405,7 +406,7 @@ test_4 (const char *str, scm_t_uintmax min, scm_t_uintmax max,
|
|||
"fail: scm_to_unsigned_int (%s, "
|
||||
"%" PRIuMAX ", %" PRIuMAX ") -> wrong type\n",
|
||||
str, min, max);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -419,7 +420,7 @@ test_4 (const char *str, scm_t_uintmax min, scm_t_uintmax max,
|
|||
"fail: scm_to_unsigned_int (%s, "
|
||||
"%" PRIuMAX ", %" PRIuMAX ") == %" PRIuMAX "\n",
|
||||
str, min, max, result);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -475,7 +476,7 @@ test_5 (scm_t_intmax val, const char *result)
|
|||
{
|
||||
fprintf (stderr, "fail: scm_from_signed_integer (%" PRIiMAX ") == %s\n",
|
||||
val, result);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -508,7 +509,7 @@ test_6 (scm_t_uintmax val, const char *result)
|
|||
fprintf (stderr, "fail: scm_from_unsigned_integer (%"
|
||||
PRIuMAX ") == %s\n",
|
||||
val, result);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -536,7 +537,7 @@ test_7s (SCM n, scm_t_intmax c_n, const char *result, const char *func)
|
|||
if (scm_is_false (scm_equal_p (n, r)))
|
||||
{
|
||||
fprintf (stderr, "fail: %s (%" PRIiMAX ") == %s\n", func, c_n, result);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -550,7 +551,7 @@ test_7u (SCM n, scm_t_uintmax c_n, const char *result, const char *func)
|
|||
if (scm_is_false (scm_equal_p (n, r)))
|
||||
{
|
||||
fprintf (stderr, "fail: %s (%" PRIuMAX ") == %s\n", func, c_n, result);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -586,7 +587,7 @@ test_8s (const char *str, scm_t_intmax (*func) (SCM), const char *func_name,
|
|||
{
|
||||
fprintf (stderr,
|
||||
"fail: %s (%s) -> out of range\n", func_name, str);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if (type_error)
|
||||
|
@ -597,7 +598,7 @@ test_8s (const char *str, scm_t_intmax (*func) (SCM), const char *func_name,
|
|||
{
|
||||
fprintf (stderr,
|
||||
"fail: %s (%s) -> wrong type\n", func_name, str);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -609,7 +610,7 @@ test_8s (const char *str, scm_t_intmax (*func) (SCM), const char *func_name,
|
|||
{
|
||||
fprintf (stderr,
|
||||
"fail: %s (%s) = %" PRIiMAX "\n", func_name, str, result);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -644,7 +645,7 @@ test_8u (const char *str, scm_t_uintmax (*func) (SCM), const char *func_name,
|
|||
{
|
||||
fprintf (stderr,
|
||||
"fail: %s (%s) -> out of range\n", func_name, str);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if (type_error)
|
||||
|
@ -655,7 +656,7 @@ test_8u (const char *str, scm_t_uintmax (*func) (SCM), const char *func_name,
|
|||
{
|
||||
fprintf (stderr,
|
||||
"fail: %s (%s) -> wrong type\n", func_name, str);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -667,7 +668,7 @@ test_8u (const char *str, scm_t_uintmax (*func) (SCM), const char *func_name,
|
|||
{
|
||||
fprintf (stderr,
|
||||
"fail: %s (%s) = %" PRIiMAX "\n", func_name, str, result);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -808,7 +809,7 @@ test_9 (double val, const char *result)
|
|||
if (scm_is_false (scm_eqv_p (res, scm_from_double (val))))
|
||||
{
|
||||
fprintf (stderr, "fail: scm_from_double (%g) == %s\n", val, result);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -895,7 +896,7 @@ test_10 (const char *val, double result, int type_error)
|
|||
{
|
||||
fprintf (stderr,
|
||||
"fail: scm_double (%s) -> wrong type\n", val);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -907,7 +908,7 @@ test_10 (const char *val, double result, int type_error)
|
|||
{
|
||||
fprintf (stderr,
|
||||
"fail: scm_to_double (%s) = %g\n", val, result);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -952,7 +953,7 @@ test_11 (const char *str, const char *result, int misc_error, int type_error)
|
|||
{
|
||||
fprintf (stderr,
|
||||
"fail: scm_to_locale_string (%s) -> misc error\n", str);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if (type_error)
|
||||
|
@ -963,7 +964,7 @@ test_11 (const char *str, const char *result, int misc_error, int type_error)
|
|||
{
|
||||
fprintf (stderr,
|
||||
"fail: scm_to_locale_string (%s) -> wrong type\n", str);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -975,7 +976,7 @@ test_11 (const char *str, const char *result, int misc_error, int type_error)
|
|||
{
|
||||
fprintf (stderr,
|
||||
"fail: scm_to_locale_string (%s) = %s\n", str, result);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -994,7 +995,7 @@ test_locale_strings ()
|
|||
if (!scm_is_string (scm_c_eval_string ("\"foo\"")))
|
||||
{
|
||||
fprintf (stderr, "fail: scm_is_string (\"foo\") = true\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
str = scm_from_locale_string (lstr);
|
||||
|
@ -1002,14 +1003,14 @@ test_locale_strings ()
|
|||
if (!scm_is_string (str))
|
||||
{
|
||||
fprintf (stderr, "fail: scm_is_string (str) = true\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
lstr2 = scm_to_locale_string (str);
|
||||
if (strcmp (lstr, lstr2))
|
||||
{
|
||||
fprintf (stderr, "fail: lstr = lstr2\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
free (lstr2);
|
||||
|
||||
|
@ -1018,17 +1019,17 @@ test_locale_strings ()
|
|||
if (len != strlen (lstr))
|
||||
{
|
||||
fprintf (stderr, "fail: scm_to_locale_stringbuf (...) = strlen(lstr)\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
if (buf[15] != 'x')
|
||||
{
|
||||
fprintf (stderr, "fail: scm_to_locale_stringbuf (...) no overrun\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
if (strncmp (lstr, buf, 15))
|
||||
{
|
||||
fprintf (stderr, "fail: scm_to_locale_stringbuf (...) = lstr\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
str2 = scm_from_locale_stringn (lstr, 10);
|
||||
|
@ -1036,14 +1037,14 @@ test_locale_strings ()
|
|||
if (!scm_is_string (str2))
|
||||
{
|
||||
fprintf (stderr, "fail: scm_is_string (str2) = true\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
lstr2 = scm_to_locale_string (str2);
|
||||
if (strncmp (lstr, lstr2, 10))
|
||||
{
|
||||
fprintf (stderr, "fail: lstr = lstr2\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
free (lstr2);
|
||||
|
||||
|
@ -1052,24 +1053,24 @@ test_locale_strings ()
|
|||
if (len != 10)
|
||||
{
|
||||
fprintf (stderr, "fail: scm_to_locale_stringbuf (...) = 10\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
if (buf[10] != 'x')
|
||||
{
|
||||
fprintf (stderr, "fail: scm_to_locale_stringbuf (...) no overrun\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
if (strncmp (lstr, buf, 10))
|
||||
{
|
||||
fprintf (stderr, "fail: scm_to_locale_stringbuf (...) = lstr\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
lstr2 = scm_to_locale_stringn (str2, &len);
|
||||
if (len != 10)
|
||||
{
|
||||
fprintf (stderr, "fail: scm_to_locale_stringn, len = 10\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
test_11 ("#f", NULL, 0, 1);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* test-list.c - exercise libguile/list.c functions */
|
||||
|
||||
/* Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include <libguile.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -36,7 +37,7 @@ test_scm_list (void)
|
|||
if (! scm_is_eq (SCM_EOL, scm_list (SCM_EOL)))
|
||||
{
|
||||
fprintf (stderr, "fail: scm_list SCM_EOL\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +46,7 @@ test_scm_list (void)
|
|||
if (! scm_is_true (scm_equal_p (lst, scm_list (lst))))
|
||||
{
|
||||
fprintf (stderr, "fail: scm_list '(1 2)\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ check_flag1 (const char *tag, void (*func)(void), int val)
|
|||
if (flag1 != val)
|
||||
{
|
||||
printf ("%s failed\n", tag);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ check_cont (int rewindable)
|
|||
if (rewindable)
|
||||
return;
|
||||
printf ("continuation not blocked\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -178,7 +178,7 @@ check_cont (int rewindable)
|
|||
if (!rewindable)
|
||||
return;
|
||||
printf ("continuation didn't work\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ check_ports ()
|
|||
/* Sanity check: Make sure that `filename' is actually writeable.
|
||||
We used to use mktemp(3), but that is now considered a security risk. */
|
||||
if (0 > mkstemp (filename))
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
|
||||
scm_dynwind_begin (0);
|
||||
{
|
||||
|
@ -239,7 +239,7 @@ check_ports ()
|
|||
if (scm_is_false (scm_equal_p (res, scm_version ())))
|
||||
{
|
||||
printf ("ports didn't work\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
scm_dynwind_end ();
|
||||
|
@ -262,13 +262,13 @@ check_fluid ()
|
|||
if (!scm_is_eq (x, scm_from_int (13)))
|
||||
{
|
||||
printf ("setting fluid didn't work\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (!scm_is_eq (scm_fluid_ref (f), scm_from_int (12)))
|
||||
{
|
||||
printf ("resetting fluid didn't work\n");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -287,7 +287,7 @@ inner_main (void *data, int argc, char **argv)
|
|||
|
||||
check_fluid ();
|
||||
|
||||
exit (0);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue