From c43e05155c3c8fc70d7cfcd50d8b508f45990239 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Sat, 15 Nov 2008 20:18:16 +0000 Subject: [PATCH] Sync to wine-1.0-rc11: - Francois Gouget Tue, 6 May 2008 Add a comment warning when a table must be kept sorted for later use with bsearch(). - Francois Gouget Tue, 6 May 2008 Assorted spelling fixes. - Marcus Meissner Tue, 6 May 2008 widl: Mark non-returning functions as noreturn. svn path=/trunk/; revision=37380 --- reactos/media/doc/README.WINE | 2 +- reactos/tools/widl/parser.l | 5 ++++- reactos/tools/widl/parser.tab.c | 2 +- reactos/tools/widl/parser.y | 2 +- reactos/tools/widl/parser.yy.c | 5 ++++- reactos/tools/widl/typelib.c | 5 +++-- reactos/tools/widl/utils.c | 3 +-- reactos/tools/widl/utils.h | 8 ++++---- 8 files changed, 19 insertions(+), 13 deletions(-) diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index bc7f4f9524c..ec09a3ef5b8 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -26,7 +26,7 @@ reactos/tools/wpp # Synced to Wine-20081105 (~Wine-1.1.7) reactos/tools/winebuild # Synced to Wine-20081105 (~Wine-1.1.7) reactos/tools/wmc # Synced to Wine-20081105 (~Wine-1.1.7) reactos/tools/wrc # Synced to Wine-20081105 (~Wine-1.1.7) -reactos/tools/widl # Synced to Wine-0_9_61 +reactos/tools/widl # Synced to Wine-1_0-rc1 The following libraries are shared with Wine. diff --git a/reactos/tools/widl/parser.l b/reactos/tools/widl/parser.l index c085d4f2ca8..437007f186b 100644 --- a/reactos/tools/widl/parser.l +++ b/reactos/tools/widl/parser.l @@ -198,6 +198,7 @@ struct keyword { int token; }; +/* This table MUST be alphabetically sorted on the kw field */ static const struct keyword keywords[] = { {"FALSE", tFALSE}, {"NULL", tNULL}, @@ -256,7 +257,9 @@ static const struct keyword keywords[] = { }; #define NKEYWORDS (sizeof(keywords)/sizeof(keywords[0])) -/* keywords only recognized in attribute lists */ +/* keywords only recognized in attribute lists + * This table MUST be alphabetically sorted on the kw field + */ static const struct keyword attr_keywords[] = { {"aggregatable", tAGGREGATABLE}, diff --git a/reactos/tools/widl/parser.tab.c b/reactos/tools/widl/parser.tab.c index 3cc926d2bca..c350d553c54 100644 --- a/reactos/tools/widl/parser.tab.c +++ b/reactos/tools/widl/parser.tab.c @@ -4905,7 +4905,7 @@ static void set_type(var_t *v, decl_spec_t *decl_spec, const declarator_t *decl, } } - /* v->type is currently pointing the the type on the left-side of the + /* v->type is currently pointing to the type on the left-side of the * declaration, so we need to fix this up so that it is the return type of the * function and make v->type point to the function side of the declaration */ if (func_type) diff --git a/reactos/tools/widl/parser.y b/reactos/tools/widl/parser.y index fff0adcc704..c337aa6f708 100644 --- a/reactos/tools/widl/parser.y +++ b/reactos/tools/widl/parser.y @@ -1592,7 +1592,7 @@ static void set_type(var_t *v, decl_spec_t *decl_spec, const declarator_t *decl, } } - /* v->type is currently pointing the the type on the left-side of the + /* v->type is currently pointing to the type on the left-side of the * declaration, so we need to fix this up so that it is the return type of the * function and make v->type point to the function side of the declaration */ if (func_type) diff --git a/reactos/tools/widl/parser.yy.c b/reactos/tools/widl/parser.yy.c index c2c613cf1ad..31528be0517 100644 --- a/reactos/tools/widl/parser.yy.c +++ b/reactos/tools/widl/parser.yy.c @@ -1996,6 +1996,7 @@ struct keyword { int token; }; +/* This table MUST be alphabetically sorted on the kw field */ static const struct keyword keywords[] = { {"FALSE", tFALSE}, {"NULL", tNULL}, @@ -2054,7 +2055,9 @@ static const struct keyword keywords[] = { }; #define NKEYWORDS (sizeof(keywords)/sizeof(keywords[0])) -/* keywords only recognized in attribute lists */ +/* keywords only recognized in attribute lists + * This table MUST be alphabetically sorted on the kw field + */ static const struct keyword attr_keywords[] = { {"aggregatable", tAGGREGATABLE}, diff --git a/reactos/tools/widl/typelib.c b/reactos/tools/widl/typelib.c index 4f2b05d46b1..b6464354e68 100644 --- a/reactos/tools/widl/typelib.c +++ b/reactos/tools/widl/typelib.c @@ -100,8 +100,9 @@ int is_array(const type_t *t) } /* List of oleauto types that should be recognized by name. - * (most of) these seem to be intrinsic types in mktyplib. */ - + * (most of) these seem to be intrinsic types in mktyplib. + * This table MUST be alphabetically sorted on the kw field. + */ static const struct oatype { const char *kw; unsigned short vt; diff --git a/reactos/tools/widl/utils.c b/reactos/tools/widl/utils.c index 9c4452fa6af..1730e41c608 100644 --- a/reactos/tools/widl/utils.c +++ b/reactos/tools/widl/utils.c @@ -67,7 +67,7 @@ static void generic_msg(const loc_info_t *loc_info, const char *s, const char *t /* yyerror: yacc assumes this is not newline terminated. */ -int parser_error(const char *s, ...) +void parser_error(const char *s, ...) { loc_info_t cur_location = CURRENT_LOCATION; va_list ap; @@ -76,7 +76,6 @@ int parser_error(const char *s, ...) fprintf(stderr, "\n"); va_end(ap); exit(1); - return 1; } void error_loc(const char *s, ...) diff --git a/reactos/tools/widl/utils.h b/reactos/tools/widl/utils.h index 73adf54ad80..761d3b46453 100644 --- a/reactos/tools/widl/utils.h +++ b/reactos/tools/widl/utils.h @@ -33,11 +33,11 @@ char *xstrdup(const char *str); #define __attribute__(X) #endif -int parser_error(const char *s, ...) __attribute__((format (printf, 1, 2))); +void parser_error(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn)); int parser_warning(const char *s, ...) __attribute__((format (printf, 1, 2))); -void error_loc(const char *s, ...) __attribute__((format (printf, 1, 2))); -void error(const char *s, ...) __attribute__((format (printf, 1, 2))); -void error_loc_info(const loc_info_t *, const char *s, ...) __attribute__((format (printf, 2, 3))); +void error_loc(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn)); +void error(const char *s, ...) __attribute__((format (printf, 1, 2))) __attribute__((noreturn)); +void error_loc_info(const loc_info_t *, const char *s, ...) __attribute__((format (printf, 2, 3))) __attribute__((noreturn)); void warning(const char *s, ...) __attribute__((format (printf, 1, 2))); void warning_loc_info(const loc_info_t *, const char *s, ...) __attribute__((format (printf, 2, 3))); void chat(const char *s, ...) __attribute__((format (printf, 1, 2)));