* 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.
/lib/unistr.h
/lib/unitypes.h
/lib/c++defs.h
+/.sc-start-*
-m4/version-etc.m4
+m4/absolute-header.m4
+m4/*
--- /dev/null
+doc/*
+lib/flock.c
+libguile/filesys.c
+libguile/ChangeLog-2008
--- /dev/null
+test-suite/*
+examples/*
+doc/example-smob/*
+libguile/gen-scmconfig.c
+*
--- /dev/null
+lib/*
+libguile/win32-socket.c
--- /dev/null
+configure.ac
+NEWS
+doc/ref/api-init.texi
+libguile/ChangeLog*
** 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).
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
(format #t \"# Automatically generated, do not edit.~%\") \
(format #t \"$$variable = \") \
(for-each (lambda (m) \
- (format #t \"$$""(top_srcdir)/module/~a.scm \" \
- (string-join (map symbol->string m) \"/\"))) \
- (map car *modules*))" > "$@.tmp"
+ (format #t \"$$""(top_srcdir)/module/~a.scm \" \
+ (string-join (map symbol->string m) \"/\"))) \
+ (map car *modules*))" > "$@.tmp"
mv "$@.tmp" "$@"
# The following line leads to the definition of $(standard_library_scm_files).
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.
#define SCM_BUILDING_DEPRECATED_CODE
-#include <signal.h>
#include "libguile/_scm.h"
#include "libguile/eval.h"
#include "libguile/throw.h"
-/* 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
# include <config.h>
#endif
+#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
/* No return, but just in case: */
fprintf (stderr, "Guile scm_ithrow returned!\n");
- exit (1);
+ exit (EXIT_FAILURE);
}
#undef FUNC_NAME
#endif
#include <alloca.h>
-#include <assert.h>
#include "libguile/__scm.h"
# include <config.h>
#endif
+#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>
#include <fcntl.h>
fputs ("\nin ", stderr);
fputs (s ? "setjump" : "scmfig", stderr);
fputs (".h and recompile scm\n", stderr);
- exit (1);
+ exit (EXIT_FAILURE);
}
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
if (res == NULL)
exit (EXIT_FAILURE);
else
- exit (0);
+ exit (EXIT_SUCCESS);
}
static void *
#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
goal.
*/
+#include <stdlib.h>
#include <errno.h>
-/* Threads
+/* Threads
*/
#define scm_i_pthread_t int
#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
# include <config.h>
#endif
+#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
|| ! strcmp (argv[i], "--help"))
{
scm_shell_usage (0, 0);
- exit (0);
+ exit (EXIT_SUCCESS);
}
else if (! strcmp (argv[i], "-v")
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
#include <libguile.h>
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
fprintf (stderr, "fail: scm_is_signed_integer (%s, "
"%" PRIiMAX ", %" PRIiMAX ") == %d\n",
str, min, max, result);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
fprintf (stderr, "fail: scm_is_unsigned_integer (%s, "
"%" PRIuMAX ", %" PRIuMAX ") == %d\n",
str, min, max, result);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
"fail: scm_to_signed_int (%s, "
"%" PRIiMAX ", %" PRIiMAX ") -> out of range\n",
str, min, max);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
else if (type_error)
"fail: scm_to_signed_int (%s, "
"%" PRIiMAX", %" PRIiMAX ") -> wrong type\n",
str, min, max);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
else
"fail: scm_to_signed_int (%s, "
"%" PRIiMAX ", %" PRIiMAX ") = %" PRIiMAX "\n",
str, min, max, result);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
}
"fail: scm_to_unsigned_int (%s, "
"%" PRIuMAX ", %" PRIuMAX ") -> out of range\n",
str, min, max);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
else if (type_error)
"fail: scm_to_unsigned_int (%s, "
"%" PRIuMAX ", %" PRIuMAX ") -> wrong type\n",
str, min, max);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
else
"fail: scm_to_unsigned_int (%s, "
"%" PRIuMAX ", %" PRIuMAX ") == %" PRIuMAX "\n",
str, min, max, result);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
}
{
fprintf (stderr, "fail: scm_from_signed_integer (%" PRIiMAX ") == %s\n",
val, result);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
fprintf (stderr, "fail: scm_from_unsigned_integer (%"
PRIuMAX ") == %s\n",
val, result);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
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);
}
}
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);
}
}
{
fprintf (stderr,
"fail: %s (%s) -> out of range\n", func_name, str);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
else if (type_error)
{
fprintf (stderr,
"fail: %s (%s) -> wrong type\n", func_name, str);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
else
{
fprintf (stderr,
"fail: %s (%s) = %" PRIiMAX "\n", func_name, str, result);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
}
{
fprintf (stderr,
"fail: %s (%s) -> out of range\n", func_name, str);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
else if (type_error)
{
fprintf (stderr,
"fail: %s (%s) -> wrong type\n", func_name, str);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
else
{
fprintf (stderr,
"fail: %s (%s) = %" PRIiMAX "\n", func_name, str, result);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
}
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);
}
}
{
fprintf (stderr,
"fail: scm_double (%s) -> wrong type\n", val);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
else
{
fprintf (stderr,
"fail: scm_to_double (%s) = %g\n", val, result);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
}
{
fprintf (stderr,
"fail: scm_to_locale_string (%s) -> misc error\n", str);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
else if (type_error)
{
fprintf (stderr,
"fail: scm_to_locale_string (%s) -> wrong type\n", str);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
else
{
fprintf (stderr,
"fail: scm_to_locale_string (%s) = %s\n", str, result);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
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);
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);
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);
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);
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);
/* 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
#include <libguile.h>
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
if (! scm_is_eq (SCM_EOL, scm_list (SCM_EOL)))
{
fprintf (stderr, "fail: scm_list SCM_EOL\n");
- exit (1);
+ exit (EXIT_FAILURE);
}
}
if (! scm_is_true (scm_equal_p (lst, scm_list (lst))))
{
fprintf (stderr, "fail: scm_list '(1 2)\n");
- exit (1);
+ exit (EXIT_FAILURE);
}
}
}
if (flag1 != val)
{
printf ("%s failed\n", tag);
- exit (1);
+ exit (EXIT_FAILURE);
}
}
if (rewindable)
return;
printf ("continuation not blocked\n");
- exit (1);
+ exit (EXIT_FAILURE);
}
else
{
if (!rewindable)
return;
printf ("continuation didn't work\n");
- exit (1);
+ exit (EXIT_FAILURE);
}
}
/* 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);
{
if (scm_is_false (scm_equal_p (res, scm_version ())))
{
printf ("ports didn't work\n");
- exit (1);
+ exit (EXIT_FAILURE);
}
}
scm_dynwind_end ();
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);
}
}
check_fluid ();
- exit (0);
+ exit (EXIT_SUCCESS);
}
int