From b3da54d1813f34fca31cdb5fd3db90b9141b1b7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 5 Jan 2012 23:38:10 +0100 Subject: [PATCH] Placate a number of `syntax-check' verifications. - "filesystem" -> "file system" - remove doubled words - use EXIT_* macros instead of literal numbers - update `syntax-check' exclusion files --- .x-sc_bindtextdomain | 1 + .x-sc_error_message_uppercase | 1 + .x-sc_obsolete_symbols | 1 + .x-sc_prohibit_doubled_word | 7 +++++++ .x-sc_prohibit_have_config_h | 5 +++++ .x-sc_prohibit_magic_number_exit | 1 + .x-sc_prohibit_path_max_allocation | 2 ++ .x-sc_prohibit_strcmp | 3 +++ HACKING | 4 ++-- NEWS | 8 ++++---- doc/maint/guile.texi | 2 +- doc/ref/api-compound.texi | 2 +- doc/ref/api-io.texi | 2 +- doc/ref/api-procedures.texi | 6 +++--- doc/sources/env.texi | 4 ++-- libguile/Makefile.am | 2 +- libguile/strings.h | 2 +- libguile/threads.c | 7 +++++-- module/ice-9/boot-9.scm | 9 +++++---- module/ice-9/psyntax.scm | 2 +- module/ice-9/test.scm | 2 +- module/language/elisp/runtime/macros.scm | 2 +- module/language/tree-il/fix-letrec.scm | 2 +- module/srfi/srfi-1.scm | 2 +- module/system/base/compile.scm | 2 +- test-suite/lib.scm | 2 +- test-suite/tests/r4rs.test | 2 +- test-suite/tests/srfi-67.test | 2 +- test-suite/tests/statprof.test | 2 +- 29 files changed, 57 insertions(+), 32 deletions(-) create mode 100644 .x-sc_bindtextdomain create mode 100644 .x-sc_prohibit_doubled_word create mode 100644 .x-sc_prohibit_have_config_h create mode 100644 .x-sc_prohibit_path_max_allocation create mode 100644 .x-sc_prohibit_strcmp diff --git a/.x-sc_bindtextdomain b/.x-sc_bindtextdomain new file mode 100644 index 000000000..72e8ffc0d --- /dev/null +++ b/.x-sc_bindtextdomain @@ -0,0 +1 @@ +* diff --git a/.x-sc_error_message_uppercase b/.x-sc_error_message_uppercase index 25078a12b..cc3fe0ddd 100644 --- a/.x-sc_error_message_uppercase +++ b/.x-sc_error_message_uppercase @@ -4,3 +4,4 @@ ^emacs/ ^NEWS ^doc/ +^test-suite/tests/ports.test diff --git a/.x-sc_obsolete_symbols b/.x-sc_obsolete_symbols index 5b1140cef..6f9b57d5a 100644 --- a/.x-sc_obsolete_symbols +++ b/.x-sc_obsolete_symbols @@ -1,4 +1,5 @@ doc/* lib/flock.c +lib/fcntl.in.h libguile/filesys.c libguile/ChangeLog-2008 diff --git a/.x-sc_prohibit_doubled_word b/.x-sc_prohibit_doubled_word new file mode 100644 index 000000000..fe2d3d02a --- /dev/null +++ b/.x-sc_prohibit_doubled_word @@ -0,0 +1,7 @@ +^AUTHORS +^gc-benchmarks/larceny/ +^module/ice-9/format.scm +^module/ice-9/match.upstream.scm +^module/sxml/upstream +compile.scm +ChangeLog diff --git a/.x-sc_prohibit_have_config_h b/.x-sc_prohibit_have_config_h new file mode 100644 index 000000000..4f18e845c --- /dev/null +++ b/.x-sc_prohibit_have_config_h @@ -0,0 +1,5 @@ +libguile/* +srfi/* +test-suite/* +guile-readline/* +lib/* diff --git a/.x-sc_prohibit_magic_number_exit b/.x-sc_prohibit_magic_number_exit index adcd138ba..3aac7a4b3 100644 --- a/.x-sc_prohibit_magic_number_exit +++ b/.x-sc_prohibit_magic_number_exit @@ -2,3 +2,4 @@ configure.ac NEWS doc/ref/api-init.texi libguile/ChangeLog* +m4/* diff --git a/.x-sc_prohibit_path_max_allocation b/.x-sc_prohibit_path_max_allocation new file mode 100644 index 000000000..4e46d8b6a --- /dev/null +++ b/.x-sc_prohibit_path_max_allocation @@ -0,0 +1,2 @@ +libguile/win32-socket.c +lib/stat.c diff --git a/.x-sc_prohibit_strcmp b/.x-sc_prohibit_strcmp new file mode 100644 index 000000000..784791f50 --- /dev/null +++ b/.x-sc_prohibit_strcmp @@ -0,0 +1,3 @@ +m4/* +lib/* +test-suite/* diff --git a/HACKING b/HACKING index 82839a566..b08f7c2d4 100644 --- a/HACKING +++ b/HACKING @@ -1,6 +1,6 @@ -*-text-*- Guile Hacking Guide -Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2008 Free software Foundation, Inc. +Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2008, 2012 Free software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the @@ -222,7 +222,7 @@ When deprecating a definition, always follow this procedure: manage without the deprecated definition. 4. Add an entry that the definition has been deprecated in NEWS and - explain what do do instead. + explain what to do instead. 5. In file TODO, there is a list of releases with reminders about what to do at each release. Add a reminder about the removal of the diff --git a/NEWS b/NEWS index cb0dafc54..60981302b 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,5 @@ Guile NEWS --- history of user-visible changes. -Copyright (C) 1996-2011 Free Software Foundation, Inc. +Copyright (C) 1996-2012 Free Software Foundation, Inc. See the end for copying conditions. Please send Guile bug reports to bug-guile@gnu.org. @@ -1386,7 +1386,7 @@ Arguments", and "Case-lambda" in the manual. Instead of accessing a procedure's arity as a property, use the new `procedure-minimum-arity' function, which gives the most permissive -arity that the the function has, in the same format as the old arity +arity that the function has, in the same format as the old arity accessor. ** `lambda*' and `define*' are now available in the default environment @@ -2156,7 +2156,7 @@ allocated to primitive procedures, each with its own calling convention. Now there is only one, the gsubr. This may affect user code if you were defining a procedure using scm_c_make_subr rather scm_c_make_gsubr. The solution is to switch to use scm_c_make_gsubr. This solution works well -both with the old 1.8 and and with the current 1.9 branch. +both with the old 1.8 and with the current 1.9 branch. Guile's old evaluator used to have special cases for applying "gsubrs", primitive procedures with specified numbers of required, optional, and @@ -6193,7 +6193,7 @@ incrementally add to the innermost environment, without checking whether the restrictions specified in RnRS were met. This lead to the correct behaviour when these restriction actually were met, but didn't catch all illegal uses. Such an illegal use could lead to crashes of -the Guile interpreter or or other unwanted results. An example of +the Guile interpreter or other unwanted results. An example of incorrect internal defines that made Guile behave erratically: (let () diff --git a/doc/maint/guile.texi b/doc/maint/guile.texi index d521f980b..c0570f24b 100644 --- a/doc/maint/guile.texi +++ b/doc/maint/guile.texi @@ -7132,7 +7132,7 @@ with the strings in the list @var{ls}. @deffn {Scheme Procedure} string-concatenate-reverse/shared ls [final_string [end]] @deffnx {C Function} scm_string_concatenate_reverse_shared (ls, final_string, end) Like @code{string-concatenate-reverse}, but the result may -share memory with the the strings in the @var{ls} arguments. +share memory with the strings in the @var{ls} arguments. @end deffn string-map diff --git a/doc/ref/api-compound.texi b/doc/ref/api-compound.texi index da8ca9199..03891fac4 100644 --- a/doc/ref/api-compound.texi +++ b/doc/ref/api-compound.texi @@ -1560,7 +1560,7 @@ same type, and have corresponding elements which are either @c FIXME: array-for-each doesn't say what happens if the sources have @c different index ranges. The code currently iterates over the @c indices of the first and expects the others to cover those. That -@c at least vaguely matches array-map!, but is is meant to be a +@c at least vaguely matches array-map!, but is it meant to be a @c documented feature? @deffn {Scheme Procedure} array-map! dst proc src1 @dots{} srcN diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi index afcde579d..9799c31d5 100644 --- a/doc/ref/api-io.texi +++ b/doc/ref/api-io.texi @@ -1181,7 +1181,7 @@ procedures and does not rely on R6RS support. Some of the procedures described in this chapter accept a file name as an argument. Valid values for such a file name include strings that name a file -using the native notation of filesystem paths on an implementation's +using the native notation of file system paths on an implementation's underlying operating system, and may include implementation-dependent values as well. diff --git a/doc/ref/api-procedures.texi b/doc/ref/api-procedures.texi index f1861a54a..2b4a05e08 100644 --- a/doc/ref/api-procedures.texi +++ b/doc/ref/api-procedures.texi @@ -1,7 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009, 2010, 2011 -@c Free Software Foundation, Inc. +@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009, 2010, +@c 2011, 2012 Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @node Procedures @@ -838,7 +838,7 @@ demonstrably improves performance in a crucial way. In general, only small procedures should be considered for inlining, as making large procedures inlinable will probably result in an increase in code size. Additionally, the elimination of the call overhead rarely -matters for for large procedures. +matters for large procedures. @deffn {Scheme Syntax} define-inlinable (name parameter ...) body ... Define @var{name} as a procedure with parameters @var{parameter}s and diff --git a/doc/sources/env.texi b/doc/sources/env.texi index a3efce2e2..7a37b768b 100644 --- a/doc/sources/env.texi +++ b/doc/sources/env.texi @@ -21,7 +21,7 @@ [[add refs for all conditions signalled]] @ifinfo -Copyright 1999, 2006 Free Software Foundation, Inc. +Copyright 1999, 2006, 2012 Free Software Foundation, Inc. @end ifinfo @titlepage @@ -204,7 +204,7 @@ can implement any module system you like, as long as its efforts produce an environment object the interpreter can consult. Finally, environments may prove a convenient way for Guile to access the -features of other systems. For example, one might export the The GIMP's +features of other systems. For example, one might export The GIMP's Procedural Database to Guile as a custom environment type; this environment could create Scheme procedure objects corresponding to GIMP procedures, as the user referenced them. diff --git a/libguile/Makefile.am b/libguile/Makefile.am index 1817100fd..c181b998f 100644 --- a/libguile/Makefile.am +++ b/libguile/Makefile.am @@ -62,7 +62,7 @@ gen-scmconfig.$(OBJEXT): gen-scmconfig.c $(AM_V_GEN) \ if [ "$(cross_compiling)" = "yes" ]; then \ $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) -I$(top_builddir) \ - -c -o $@ $<; \ + -c -o $@ $<; \ else \ $(COMPILE) -c -o $@ $<; \ fi diff --git a/libguile/strings.h b/libguile/strings.h index b1fc51a38..42e57ace3 100644 --- a/libguile/strings.h +++ b/libguile/strings.h @@ -85,7 +85,7 @@ - SCM_STRING_CHARS uses scm_i_string_writable_chars and immediately calls scm_i_stop_writing, hoping for the best. SCM_STRING_LENGTH is the same as scm_i_string_length. SCM_STRING_CHARS will throw - an error for for strings that are not null-terminated. There is + an error for strings that are not null-terminated. There is no wide version of this interface. */ diff --git a/libguile/threads.c b/libguile/threads.c index 3d98e5e57..ad8720bfa 100644 --- a/libguile/threads.c +++ b/libguile/threads.c @@ -1,4 +1,6 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, + * 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 + * 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 @@ -25,6 +27,7 @@ #include "libguile/bdw-gc.h" #include "libguile/_scm.h" +#include #if HAVE_UNISTD_H #include #endif @@ -862,7 +865,7 @@ scm_init_guile () else { fprintf (stderr, "Failed to get stack base for current thread.\n"); - exit (1); + exit (EXIT_FAILURE); } } diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 03dad9b0d..75097b554 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -1,7 +1,8 @@ ;;; -*- mode: scheme; coding: utf-8; -*- -;;;; Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011 -;;;; Free Software Foundation, Inc. +;;;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, +;;;; 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +;;;; 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 @@ -3013,7 +3014,7 @@ module '(ice-9 q) '(make-q q-length))}." ;; 0 by printing a newline, but we then advance it by printing ;; the prompt. However the port-column of the output port ;; does not typically correspond with the actual column on the - ;; screen, because the input is is echoed back! Since the + ;; screen, because the input is echoed back! Since the ;; input is line-buffered and thus ends with a newline, the ;; output will really start on column zero. So, here we zero ;; it out. See bug 9664. @@ -3504,7 +3505,7 @@ module '(ice-9 q) '(make-q q-length))}." ;;; {`load'.} ;;; ;;; Load is tricky when combined with relative paths, compilation, and -;;; the filesystem. If a path is relative, what is it relative to? The +;;; the file system. If a path is relative, what is it relative to? The ;;; path of the source file at the time it was compiled? The path of ;;; the compiled file? What if both or either were installed? And how ;;; do you get that information? Tricky, I say. diff --git a/module/ice-9/psyntax.scm b/module/ice-9/psyntax.scm index 22c51613d..6ffcc2d58 100644 --- a/module/ice-9/psyntax.scm +++ b/module/ice-9/psyntax.scm @@ -1265,7 +1265,7 @@ ;; ;; The only wrinkle is when we want a macro to expand to code in another ;; module, as is the case for the r6rs `library' form -- the body expressions - ;; should be scoped relative the the new module, the one defined by the macro. + ;; should be scoped relative the new module, the one defined by the macro. ;; For that, use `(@@ mod-name body)'. ;; ;; Part of the macro output will be from the site of the macro use and part diff --git a/module/ice-9/test.scm b/module/ice-9/test.scm index f6080e4cf..179cfc35e 100644 --- a/module/ice-9/test.scm +++ b/module/ice-9/test.scm @@ -17,7 +17,7 @@ ;;;; "test.scm" Test correctness of scheme implementations. ;;; Author: Aubrey Jaffer ;;; Modified: Mikael Djurfeldt (Removed tests which Guile deliberately -;;; won't pass. Made the the tests (test-cont), (test-sc4), and +;;; won't pass. Made the tests (test-cont), (test-sc4), and ;;; (test-delay) start to run automatically. ;;; This includes examples from diff --git a/module/language/elisp/runtime/macros.scm b/module/language/elisp/runtime/macros.scm index a62f721e7..b28706781 100644 --- a/module/language/elisp/runtime/macros.scm +++ b/module/language/elisp/runtime/macros.scm @@ -81,7 +81,7 @@ (progn ,@(cdr cur)) ,rest)))))))) -;;; The and and or forms can also be easily defined with macros. +;;; The `and' and `or' forms can also be easily defined with macros. (built-in-macro and (case-lambda diff --git a/module/language/tree-il/fix-letrec.scm b/module/language/tree-il/fix-letrec.scm index 3d7db27a8..f387df193 100644 --- a/module/language/tree-il/fix-letrec.scm +++ b/module/language/tree-il/fix-letrec.scm @@ -239,7 +239,7 @@ c) (list body))) (else - ;; Otherwise for plain letrec, evaluate the the "complex" + ;; Otherwise for plain letrec, evaluate the "complex" ;; bindings, in a `let' to indicate that order doesn't ;; matter, and bind to their variables. (list diff --git a/module/srfi/srfi-1.scm b/module/srfi/srfi-1.scm index d2347b0d1..d2531b59d 100644 --- a/module/srfi/srfi-1.scm +++ b/module/srfi/srfi-1.scm @@ -652,7 +652,7 @@ has just one element then that's the return value." (define map! map) (define (filter-map proc list1 . rest) - "Apply PROC to to the elements of LIST1... and return a list of the + "Apply PROC to the elements of LIST1... and return a list of the results as per SRFI-1 `map', except that any #f results are omitted from the list returned." (check-arg procedure? proc filter-map) diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm index 953c93602..0bc11a30f 100644 --- a/module/system/base/compile.scm +++ b/module/system/base/compile.scm @@ -93,7 +93,7 @@ ;;; This function is among the trickiest I've ever written. I tried many ;;; variants. In the end, simple is best, of course. ;;; -;;; After turning this around a number of times, it seems that the the +;;; After turning this around a number of times, it seems that the ;;; desired behavior is that .go files should exist in a path, for ;;; searching. That is orthogonal to this function. For writing .go ;;; files, either you know where they should go, in which case you tell diff --git a/test-suite/lib.scm b/test-suite/lib.scm index ecf39245a..9a03dc915 100644 --- a/test-suite/lib.scm +++ b/test-suite/lib.scm @@ -119,7 +119,7 @@ ;;;; ;;;; * (pass-if-exception name exception body) will pass if the execution of ;;;; body causes the given exception to be thrown. If no exception is -;;;; thrown, the test fails. If some other exception is thrown, is is an +;;;; thrown, the test fails. If some other exception is thrown, it is an ;;;; error. ;;;; * (expect-fail-exception name exception body) will pass unexpectedly if ;;;; the execution of body causes the given exception to be thrown. If no diff --git a/test-suite/tests/r4rs.test b/test-suite/tests/r4rs.test index e26fdada3..1e4243cae 100644 --- a/test-suite/tests/r4rs.test +++ b/test-suite/tests/r4rs.test @@ -35,7 +35,7 @@ ;;;; Author: Aubrey Jaffer ;;;; Modified: Mikael Djurfeldt ;;;; Removed tests which Guile deliberately -;;;; won't pass. Made the the tests (test-cont), (test-sc4), and +;;;; won't pass. Made the tests (test-cont), (test-sc4), and ;;;; (test-delay) start to run automatically. ;;;; Modified: Jim Blandy ;;;; adapted to new Guile test suite framework diff --git a/test-suite/tests/srfi-67.test b/test-suite/tests/srfi-67.test index e5a4471ee..312282e92 100644 --- a/test-suite/tests/srfi-67.test +++ b/test-suite/tests/srfi-67.test @@ -36,7 +36,7 @@ ; Test engine ; =========== ; -; We use an extended version of the the checker of SRFI-42 (with +; We use an extended version of the checker of SRFI-42 (with ; Felix' reduction on codesize) for running a batch of tests for ; the various procedures of 'compare.scm'. Moreover, we use the ; comprehensions of SRFI-42 to generate examples systematically. diff --git a/test-suite/tests/statprof.test b/test-suite/tests/statprof.test index 7ce39badb..b2ee41e1b 100644 --- a/test-suite/tests/statprof.test +++ b/test-suite/tests/statprof.test @@ -75,7 +75,7 @@ (let ((drift-fraction (/ max-diff average))) (or (< drift-fraction max-allowed-drift) - ;; don't stop the the test suite for what statistically is + ;; don't stop the test suite for what statistically is ;; bound to happen. (throw 'unresolved (pk average drift-fraction)))))))) -- 2.20.1