2001-12-20 Bruno Haible <bruno@clisp.org>
* format-java.c: Include system.h.
+ * format-lisp.c (parse_upto): Fix prototype. char promotes to int.
+ * po-lex.c (mb_iseq, mb_setascii): Likewise.
+ * po-hash-gen.y: alloca fix for AIX 3.
+ * write-mo.c: Likewise.
+ * x-lisp.c (syntax_code_of, read_char_syntax, attribute_of): Move
+ prototypes, to avoid compilation errors on AIX 3.
+ * x-java.l (TOKEN_TYPE): Remove trailing comma in enum.
+ (PARSER_STATE): Likewise.
+ * msgfilter.c: Include <sys/select.h> on AIX.
2001-12-12 Bruno Haible <bruno@clisp.org>
struct format_arg_list **listp,
struct format_arg_list **escapep,
int *separatorp, struct spec *spec,
- char terminator, bool separator));
+ /*promote: char*/ int terminator,
+ bool separator));
static void *format_parse PARAMS ((const char *format));
static void format_free PARAMS ((void *descr));
static int format_get_number_of_directives PARAMS ((void *descr));
# include <unistd.h>
#endif
+/* Get fd_set. */
+#ifdef _AIX
+# include <sys/select.h>
+#endif
+
#include "dir-list.h"
#include "error.h"
#include "progname.h"
%{
+/* The bison generated parser uses alloca. AIX 3 forces us to put this
+ declaration at the beginning of the file. The declaration in bison's
+ skeleton file comes too late. This must come before <config.h>
+ because <config.h> may include arbitrary system headers. */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
static inline bool mb_iseof PARAMS ((const mbchar_t mbc));
static inline const char *mb_ptr PARAMS ((const mbchar_t mbc));
static inline size_t mb_len PARAMS ((const mbchar_t mbc));
-static inline bool mb_iseq PARAMS ((const mbchar_t mbc, char sc));
+static inline bool mb_iseq PARAMS ((const mbchar_t mbc,
+ /*promote: char*/ int sc));
static inline bool mb_isnul PARAMS ((const mbchar_t mbc));
static inline int mb_cmp PARAMS ((const mbchar_t mbc1, const mbchar_t mbc2));
static inline bool mb_equal PARAMS ((const mbchar_t mbc1, const mbchar_t mbc2));
static inline bool mb_isascii PARAMS ((const mbchar_t mbc));
static int mb_width PARAMS ((const mbchar_t mbc));
static inline void mb_putc PARAMS ((const mbchar_t mbc, FILE *stream));
-static inline void mb_setascii PARAMS ((mbchar_t mbc, char sc));
+static inline void mb_setascii PARAMS ((mbchar_t mbc,
+ /*promote: char*/ int sc));
static inline void mb_copy PARAMS ((mbchar_t new, const mbchar_t old));
/* A version of memcpy optimized for the case n <= 1. */
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+/* AIX 3 forces us to put this declaration at the beginning of the file. */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
+
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
JAVA_STRING,
JAVA_OPERATOR,
JAVA_FLOW,
- JAVA_COMMENT,
+ JAVA_COMMENT
} TOKEN_TYPE;
typedef struct
STATE_WORD,
STATE_APPEND,
STATE_INVOCATION,
- STATE_KEYWORD,
+ STATE_KEYWORD
} PARSER_STATE;
typedef struct
static void init_keywords PARAMS ((void));
static int do_getc PARAMS ((void));
static void do_ungetc PARAMS ((int c));
-static enum syntax_code syntax_code_of PARAMS ((unsigned char c));
-static void read_char_syntax PARAMS ((struct char_syntax *p));
-static enum attribute attribute_of PARAMS ((unsigned char c));
static inline void init_token PARAMS ((struct token *tp));
static inline void free_token PARAMS ((struct token *tp));
static inline void grow_token PARAMS ((struct token *tp));
syntax_nt_macro /* '#' (non-terminating macro) */
};
+/* Prototypes for local functions. Needed to ensure compiler checking of
+ function argument counts despite of K&R C function definition syntax. */
+static enum syntax_code syntax_code_of PARAMS ((unsigned char c));
+static void read_char_syntax PARAMS ((struct char_syntax *p));
+
/* Returns the syntax code of a character. */
static enum syntax_code
syntax_code_of (c)
#define is_letter_attribute(a) ((a) >= a_letter)
#define is_number_attribute(a) ((a) >= a_ratio)
+/* Prototypes for local functions. Needed to ensure compiler checking of
+ function argument counts despite of K&R C function definition syntax. */
+static enum attribute attribute_of PARAMS ((unsigned char c));
+
/* Returns the attribute of a character, assuming base 10. */
static enum attribute
attribute_of (c)