diff options
author | Ludovic Courtès <ludo@gnu.org> | 2010-08-20 21:08:49 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2010-08-27 18:59:42 +0200 |
commit | 93003b16b03a3aac486994f01140c0ebc6fe1b66 (patch) | |
tree | eb8bc4ac07d7ad57cb5ee6a8b4199304bb488f8f /libguile | |
parent | 172988eeb4445ca5408be55a9888f7c2d59a316b (diff) | |
download | guile-93003b16b03a3aac486994f01140c0ebc6fe1b66.tar.gz |
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.
Diffstat (limited to 'libguile')
-rw-r--r-- | libguile/async.c | 1 | ||||
-rw-r--r-- | libguile/error.c | 5 | ||||
-rw-r--r-- | libguile/eval.c | 1 | ||||
-rw-r--r-- | libguile/init.c | 9 | ||||
-rw-r--r-- | libguile/null-threads.h | 7 | ||||
-rw-r--r-- | libguile/script.c | 5 |
6 files changed, 15 insertions, 13 deletions
diff --git a/libguile/async.c b/libguile/async.c index e448dc1d5..141244874 100644 --- a/libguile/async.c +++ b/libguile/async.c @@ -24,7 +24,6 @@ #define SCM_BUILDING_DEPRECATED_CODE -#include <signal.h> #include "libguile/_scm.h" #include "libguile/eval.h" #include "libguile/throw.h" diff --git a/libguile/error.c b/libguile/error.c index a582c8601..4b6bab868 100644 --- a/libguile/error.c +++ b/libguile/error.c @@ -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 diff --git a/libguile/eval.c b/libguile/eval.c index 752ba2ca5..f0a4ea51f 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -24,7 +24,6 @@ #endif #include <alloca.h> -#include <assert.h> #include "libguile/__scm.h" diff --git a/libguile/init.c b/libguile/init.c index b511aae76..6e4ee0e05 100644 --- a/libguile/init.c +++ b/libguile/init.c @@ -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 * diff --git a/libguile/null-threads.h b/libguile/null-threads.h index ec83ab798..116b845a5 100644 --- a/libguile/null-threads.h +++ b/libguile/null-threads.h @@ -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,15 +33,16 @@ 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 diff --git a/libguile/script.c b/libguile/script.c index 3ea425cd6..03d5de194 100644 --- a/libguile/script.c +++ b/libguile/script.c @@ -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 |