diff options
author | Bruno Haible <bruno@clisp.org> | 2001-09-22 14:47:50 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-09-22 14:47:50 +0000 |
commit | 31ee5d561790ff5c148a7afb17b73d4d4ed1ca95 (patch) | |
tree | 45dde59c14c77113fc5161df0f4471151cea7ea8 | |
parent | fdb5271b8f40aa2ab6edf48086824c56b4808a78 (diff) | |
download | external_gettext-31ee5d561790ff5c148a7afb17b73d4d4ed1ca95.zip external_gettext-31ee5d561790ff5c148a7afb17b73d4d4ed1ca95.tar.gz external_gettext-31ee5d561790ff5c148a7afb17b73d4d4ed1ca95.tar.bz2 |
Include specification .h file in implementation .c file.
42 files changed, 142 insertions, 36 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index 7b37a0c..6388048 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,5 +1,21 @@ 2001-09-08 Bruno Haible <haible@clisp.cons.org> + * findprog.c: Include specification header before all other headers. + * fstrcmp.c: Likewise. + * full-write.c: Likewise. + * hash.c: Likewise. + * linebreak.c: Likewise. + * mbswidth.c: Likewise. + * progname.c: Likewise. + * safe-read.c: Likewise. + * wait-process.c: Likewise. + * xerror.c: Likewise. + * getline.c: Include getline.h. + * mbswidth.h: Include <stddef.h>, for size_t. + * wait-process.h: Include <unistd,h> and <sys/types.h>, for pid_t. + +2001-09-08 Bruno Haible <haible@clisp.cons.org> + * javacomp.sh.in: New file. * javaexec.sh.in: New file. diff --git a/lib/c-ctype.c b/lib/c-ctype.c index 476c216..f1c5a0e 100644 --- a/lib/c-ctype.c +++ b/lib/c-ctype.c @@ -16,6 +16,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* Specification. */ #include "c-ctype.h" #undef c_isalnum diff --git a/lib/concatpath.c b/lib/concatpath.c index e229cdb..cc9088d 100644 --- a/lib/concatpath.c +++ b/lib/concatpath.c @@ -22,6 +22,7 @@ # include <config.h> #endif +/* Specification. */ #include "system.h" /* Concatenate a directory pathname, a relative pathname and an optional diff --git a/lib/findprog.c b/lib/findprog.c index b2ab40a..5b18d56 100644 --- a/lib/findprog.c +++ b/lib/findprog.c @@ -21,6 +21,9 @@ # include "config.h" #endif +/* Specification. */ +#include "findprog.h" + #include <stdlib.h> #include <string.h> @@ -28,7 +31,6 @@ # include <unistd.h> #endif -#include "findprog.h" #include "system.h" diff --git a/lib/fstrcmp.c b/lib/fstrcmp.c index 1a0d74c..7604aa5 100644 --- a/lib/fstrcmp.c +++ b/lib/fstrcmp.c @@ -34,12 +34,14 @@ # include "config.h" #endif +/* Specification. */ +#include "fstrcmp.h" + #include <string.h> #include <stdio.h> #include <limits.h> #include "system.h" -#include "fstrcmp.h" /* diff --git a/lib/full-write.c b/lib/full-write.c index 13eae22..bb784ac 100644 --- a/lib/full-write.c +++ b/lib/full-write.c @@ -22,6 +22,9 @@ # include <config.h> #endif +/* Specification. */ +#include "full-write.h" + #include <sys/types.h> #if HAVE_UNISTD_H @@ -33,8 +36,6 @@ extern int errno; #endif -#include "full-write.h" - /* Write LEN bytes at PTR to descriptor DESC, retrying if interrupted. Return LEN upon success, write's (negative) error code otherwise. */ diff --git a/lib/getline.c b/lib/getline.c index 4bbdfe9..02592b1 100644 --- a/lib/getline.c +++ b/lib/getline.c @@ -1,6 +1,6 @@ /* getline.c -- Replacement for GNU C library function getline -Copyright (C) 1993, 1996 Free Software Foundation, Inc. +Copyright (C) 1993, 1996, 2001 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 @@ -22,6 +22,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # include <config.h> #endif +/* Specification. */ +#include "getline.h" + /* The `getdelim' function is only declared if the following symbol is defined. */ #ifndef _GNU_SOURCE @@ -20,6 +20,9 @@ # include <config.h> #endif +/* Specification. */ +#include "hash.h" + #if STDC_HEADERS # include <stdlib.h> #else @@ -47,8 +50,6 @@ # include <values.h> #endif -#include "hash.h" - #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free diff --git a/lib/linebreak.c b/lib/linebreak.c index 45837a4..7afbee6 100644 --- a/lib/linebreak.c +++ b/lib/linebreak.c @@ -20,9 +20,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # include <config.h> #endif +/* Specification. */ +#include "linebreak.h" + #include <stddef.h> #include <string.h> -#include "linebreak.h" #include "c-ctype.h" #include "utf8-ucs4.h" diff --git a/lib/mbswidth.c b/lib/mbswidth.c index 69a801c..9d5ebe7 100644 --- a/lib/mbswidth.c +++ b/lib/mbswidth.c @@ -21,6 +21,9 @@ # include <config.h> #endif +/* Specification. */ +#include "mbswidth.h" + /* Get MB_CUR_MAX. */ #include <stdlib.h> @@ -78,8 +81,6 @@ int wcwidth (); #undef ISCNTRL #define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl (c)) -#include "mbswidth.h" - /* Returns the number of columns needed to represent the multibyte character string pointed to by STRING. If a non-printable character occurs, and MBSW_REJECT_UNPRINTABLE is specified, -1 is returned. diff --git a/lib/mbswidth.h b/lib/mbswidth.h index 38911da..7b2482a 100644 --- a/lib/mbswidth.h +++ b/lib/mbswidth.h @@ -15,6 +15,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <stddef.h> + #ifndef PARAMS # if defined (__GNUC__) || __STDC__ # define PARAMS(Args) Args diff --git a/lib/pipe-bidi.c b/lib/pipe-bidi.c index 244a84a..b52aacb 100644 --- a/lib/pipe-bidi.c +++ b/lib/pipe-bidi.c @@ -21,6 +21,7 @@ # include "config.h" #endif +/* Specification. */ #include "pipe.h" #include <errno.h> diff --git a/lib/pipe-in.c b/lib/pipe-in.c index fe63544..85e911f 100644 --- a/lib/pipe-in.c +++ b/lib/pipe-in.c @@ -21,6 +21,7 @@ # include "config.h" #endif +/* Specification. */ #include "pipe.h" #include <errno.h> diff --git a/lib/pipe-out.c b/lib/pipe-out.c index 77803d6..ffb6ef2 100644 --- a/lib/pipe-out.c +++ b/lib/pipe-out.c @@ -21,6 +21,7 @@ # include "config.h" #endif +/* Specification. */ #include "pipe.h" #include <errno.h> diff --git a/lib/progname.c b/lib/progname.c index 9d3b93d..78d40cb 100644 --- a/lib/progname.c +++ b/lib/progname.c @@ -21,11 +21,12 @@ # include "config.h" #endif +/* Specification. */ +#include "progname.h" + #include <stdio.h> #include <string.h> -#include "progname.h" - /* String containing name the program is called with. To be initialized by main(). */ diff --git a/lib/safe-read.c b/lib/safe-read.c index d362e48..a8947af 100644 --- a/lib/safe-read.c +++ b/lib/safe-read.c @@ -20,6 +20,9 @@ # include <config.h> #endif +/* Specification. */ +#include "safe-read.h" + #include <sys/types.h> #if HAVE_UNISTD_H @@ -31,8 +34,6 @@ extern int errno; #endif -#include "safe-read.h" - /* Read LEN bytes at PTR from descriptor DESC, retrying if interrupted. Return the actual number of bytes read, zero for EOF, or negative for an error. */ diff --git a/lib/wait-process.c b/lib/wait-process.c index 8939942..2dd9422 100644 --- a/lib/wait-process.c +++ b/lib/wait-process.c @@ -21,6 +21,9 @@ # include "config.h" #endif +/* Specification. */ +#include "wait-process.h" + #include <errno.h> #include <stdlib.h> @@ -71,7 +74,6 @@ # endif #endif -#include "wait-process.h" #include "error.h" #include "libgettext.h" diff --git a/lib/wait-process.h b/lib/wait-process.h index 23dd0ec..3d591a0 100644 --- a/lib/wait-process.h +++ b/lib/wait-process.h @@ -19,6 +19,13 @@ #ifndef _WAIT_PROCESS_H #define _WAIT_PROCESS_H +/* Get pid_t. */ +#include <stdlib.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#include <sys/types.h> + /* Wait for a subprocess to finish. Exit if it didn't terminate correctly. Otherwise return its exit code. */ extern int wait_subprocess PARAMS ((pid_t child, const char *progname)); diff --git a/lib/xerror.c b/lib/xerror.c index 5b035cd..41b8583 100644 --- a/lib/xerror.c +++ b/lib/xerror.c @@ -21,11 +21,13 @@ # include "config.h" #endif +/* Specification. */ +#include "xerror.h" + #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "xerror.h" #include "error.h" #include "progname.h" #include "mbswidth.h" diff --git a/src/ChangeLog b/src/ChangeLog index 550a08b..1eced76 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,24 @@ +2001-09-08 Bruno Haible <haible@clisp.cons.org> + + * dir-list.c: Include specification header before all other headers. + * file-list.c: Likewise. + * message.c: Likewise. + * msgl-cat.c: Likewise. + * msgl-charset.c: Likewise. + * msgl-iconv.c: Likewise. + * open-po.c: Likewise. + * po.c: Likewise. + * po-gram-gen.y: Likewise. + * po-hash-gen.y: Likewise. + * po-lex.c: Likewise. + * read-po.c: Likewise. + * str-list.c: Likewise. + * write-mo.c: Likewise. + * write-po.c: Likewise. + * msgfmt.h: Don't include message.h. + * open-po.h: Include <stdio.h>, for FILE. + * write-mo.h: Include message.h and <stddef.h>. + 2001-09-21 Tommy Johansson <tommy.johansson@kanalen.org> * x-java.l (create_char_buf): Fix problem with empty messages. diff --git a/src/dir-list.c b/src/dir-list.c index f1e5fe4..9761ffa 100644 --- a/src/dir-list.c +++ b/src/dir-list.c @@ -22,10 +22,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" #endif +/* Specification. */ +#include "dir-list.h" + #include <stdlib.h> #include "system.h" -#include "dir-list.h" #include "str-list.h" static string_list_ty *directory /* = NULL */; diff --git a/src/file-list.c b/src/file-list.c index 1cffa56..e2da461 100644 --- a/src/file-list.c +++ b/src/file-list.c @@ -19,12 +19,14 @@ # include "config.h" #endif +/* Specification. */ +#include "file-list.h" + #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "file-list.h" #include "str-list.h" #include "error.h" #include "getline.h" diff --git a/src/format.c b/src/format.c index e7bc7b4..38419d9 100644 --- a/src/format.c +++ b/src/format.c @@ -20,6 +20,7 @@ # include <config.h> #endif +/* Specification. */ #include "format.h" /* Table of all format string parsers. */ diff --git a/src/message.c b/src/message.c index 3857e36..cac5c6d 100644 --- a/src/message.c +++ b/src/message.c @@ -21,11 +21,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # include <config.h> #endif +/* Specification. */ +#include "message.h" + #include <stdlib.h> #include <string.h> #include "fstrcmp.h" -#include "message.h" #include "system.h" diff --git a/src/msgfmt.h b/src/msgfmt.h index 758e96f..4e01bd8 100644 --- a/src/msgfmt.h +++ b/src/msgfmt.h @@ -1,4 +1,4 @@ -/* msgfmt specific message representation +/* msgfmt specifics Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, April 1995. @@ -19,8 +19,6 @@ #ifndef _MSGFMT_H #define _MSGFMT_H -#include "message.h" - /* Be more verbose. Use only 'fprintf' and 'multiline_warning' but not 'error' or 'multiline_error' to emit verbosity messages, because 'error' and 'multiline_error' during PO file parsing cause the program to exit diff --git a/src/msgl-ascii.c b/src/msgl-ascii.c index 3b528e7..0fb6559 100644 --- a/src/msgl-ascii.c +++ b/src/msgl-ascii.c @@ -21,7 +21,9 @@ # include "config.h" #endif +/* Specification. */ #include "msgl-ascii.h" + #include "c-ctype.h" diff --git a/src/msgl-cat.c b/src/msgl-cat.c index a1ff339..8a5f0dd 100644 --- a/src/msgl-cat.c +++ b/src/msgl-cat.c @@ -21,9 +21,11 @@ # include "config.h" #endif +/* Specification. */ +#include "msgl-cat.h" + #include <stdlib.h> -#include "msgl-cat.h" #include "error.h" #include "xerror.h" #include "message.h" diff --git a/src/msgl-charset.c b/src/msgl-charset.c index f7db13c..45f01b9 100644 --- a/src/msgl-charset.c +++ b/src/msgl-charset.c @@ -21,11 +21,13 @@ # include "config.h" #endif +/* Specification. */ +#include "msgl-charset.h" + #include <stdlib.h> #include <string.h> #include "po-charset.h" -#include "msgl-charset.h" #include "error.h" #include "progname.h" #include "xerror.h" diff --git a/src/msgl-iconv.c b/src/msgl-iconv.c index 0faa1c2..e34c328 100644 --- a/src/msgl-iconv.c +++ b/src/msgl-iconv.c @@ -21,6 +21,9 @@ # include "config.h" #endif +/* Specification. */ +#include "msgl-iconv.h" + #include <errno.h> #include <stdlib.h> @@ -28,7 +31,6 @@ # include <iconv.h> #endif -#include "msgl-iconv.h" #include "error.h" #include "progname.h" #include "message.h" diff --git a/src/open-po.c b/src/open-po.c index 4540f3d..f8ffb69 100644 --- a/src/open-po.c +++ b/src/open-po.c @@ -20,13 +20,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # include <config.h> #endif +/* Specification. */ +#include "open-po.h" + #include <errno.h> #include <stdio.h> #include <sys/types.h> #include <stdlib.h> #include <string.h> -#include "open-po.h" #include "dir-list.h" #include "error.h" #include "system.h" diff --git a/src/open-po.h b/src/open-po.h index 8ce0f87..556168a 100644 --- a/src/open-po.h +++ b/src/open-po.h @@ -18,6 +18,8 @@ #ifndef _OPEN_PO_H #define _OPEN_PO_H +#include <stdio.h> + /* Open the input file with the name INPUT_NAME. The ending .po is added if necessary. If INPUT_NAME is not an absolute file name and the file is not found, the list of directories in "dir-list.h" is searched. The diff --git a/src/po-charset.c b/src/po-charset.c index 4465226..f4fd12f 100644 --- a/src/po-charset.c +++ b/src/po-charset.c @@ -21,7 +21,9 @@ # include "config.h" #endif +/* Specification. */ #include "po-charset.h" + #include "error.h" #include "xerror.h" #include "system.h" diff --git a/src/po-gram-gen.y b/src/po-gram-gen.y index 510cd37..da39d49 100644 --- a/src/po-gram-gen.y +++ b/src/po-gram-gen.y @@ -22,11 +22,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # include "config.h" #endif +/* Specification. */ +#include "po-gram.h" + #include <stdio.h> #include "str-list.h" #include "po-lex.h" -#include "po-gram.h" #include "error.h" #include "system.h" #include "libgettext.h" diff --git a/src/po-hash-gen.y b/src/po-hash-gen.y index 68ce63d..7232ee7 100644 --- a/src/po-hash-gen.y +++ b/src/po-hash-gen.y @@ -23,10 +23,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # include "config.h" #endif +/* Specification. */ +#include "po-hash.h" + #include <stdio.h> -#include <system.h> -#include "po-hash.h" +#include "system.h" #include "po.h" /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc), diff --git a/src/po-lex.c b/src/po-lex.c index 6d456b0..34127a4 100644 --- a/src/po-lex.c +++ b/src/po-lex.c @@ -23,6 +23,9 @@ # include "config.h" #endif +/* Specification. */ +#include "po-lex.h" + #include <errno.h> #include <limits.h> #include <stdio.h> @@ -54,7 +57,6 @@ #include "str-list.h" #include "po-charset.h" -#include "po-lex.h" #include "system.h" #include "error.h" #include "open-po.h" @@ -22,9 +22,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # include "config.h" #endif +/* Specification. */ +#include "po.h" + #include <stdlib.h> -#include "po.h" #include "po-charset.h" #include "po-hash.h" #include "system.h" diff --git a/src/read-mo.c b/src/read-mo.c index 0d7bf18..b740479 100644 --- a/src/read-mo.c +++ b/src/read-mo.c @@ -20,6 +20,7 @@ # include <config.h> #endif +/* Specification. */ #include "read-mo.h" #include <errno.h> diff --git a/src/read-po.c b/src/read-po.c index 47a305e..78d5a5b 100644 --- a/src/read-po.c +++ b/src/read-po.c @@ -20,11 +20,13 @@ # include <config.h> #endif +/* Specification. */ +#include "read-po.h" + #include <stdlib.h> #include <string.h> #include "po.h" -#include "read-po.h" #include "system.h" #include "libgettext.h" diff --git a/src/str-list.c b/src/str-list.c index a961ef3..4609434 100644 --- a/src/str-list.c +++ b/src/str-list.c @@ -21,10 +21,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # include "config.h" #endif +/* Specification. */ +#include "str-list.h" + #include <stdio.h> #include "system.h" -#include "str-list.h" /* Initialize an empty list of strings. */ diff --git a/src/write-mo.c b/src/write-mo.c index fa1488c..c234e24 100644 --- a/src/write-mo.c +++ b/src/write-mo.c @@ -20,6 +20,9 @@ # include <config.h> #endif +/* Specification. */ +#include "write-mo.h" + #include <errno.h> #include <stdbool.h> #include <stdio.h> @@ -27,7 +30,6 @@ #include <stdlib.h> #include <string.h> -#include "write-mo.h" #include "msgfmt.h" /* These two include files describe the binary .mo format. */ diff --git a/src/write-mo.h b/src/write-mo.h index 2f9c7db..cbae7ef 100644 --- a/src/write-mo.h +++ b/src/write-mo.h @@ -19,9 +19,10 @@ #ifndef _WRITE_MO_H #define _WRITE_MO_H +#include <stddef.h> #include <stdbool.h> -#include "msgfmt.h" +#include "message.h" /* Alignment of strings in resulting .mo file. */ extern size_t alignment; diff --git a/src/write-po.c b/src/write-po.c index e9c2280..c101827 100644 --- a/src/write-po.c +++ b/src/write-po.c @@ -21,6 +21,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # include <config.h> #endif +/* Specification. */ +#include "write-po.h" + #include <errno.h> #include <limits.h> #include <stdio.h> @@ -31,7 +34,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # include <iconv.h> #endif -#include "write-po.h" #include "c-ctype.h" #include "linebreak.h" #include "msgl-ascii.h" |