diff --git a/include/commctrl.h b/include/commctrl.h index cf348bb282e..1a706eb35b9 100644 --- a/include/commctrl.h +++ b/include/commctrl.h @@ -3260,26 +3260,26 @@ typedef struct tagNMDATETIMEFORMATQUERYW #define GDTR_MAX 0x0002 -#define DateTime_GetSystemtime(hdp, pst) \\ +#define DateTime_GetSystemtime(hdp, pst) \ (DWORD)SendMessageA (hdp, DTM_GETSYSTEMTIME , 0, (LPARAM)(pst)) -#define DateTime_SetSystemtime(hdp, gd, pst) \\ +#define DateTime_SetSystemtime(hdp, gd, pst) \ (BOOL)SendMessageA (hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst)) -#define DateTime_GetRange(hdp, rgst) \\ +#define DateTime_GetRange(hdp, rgst) \ (DWORD)SendMessageA (hdp, DTM_GETRANGE, 0, (LPARAM)(rgst)) -#define DateTime_SetRange(hdp, gd, rgst) \\ +#define DateTime_SetRange(hdp, gd, rgst) \ (BOOL)SendMessageA (hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst)) #define DateTime_SetFormat WINELIB_NAME_AW(DateTime_SetFormat) -#define DateTime_SetFormatA(hdp, sz) \\ +#define DateTime_SetFormatA(hdp, sz) \ (BOOL)SendMessageA (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz)) -#define DateTime_SetFormatW(hdp, sz) \\ +#define DateTime_SetFormatW(hdp, sz) \ (BOOL)SendMessageW (hdp, DTM_SETFORMAT, 0, (LPARAM)(sz)) -#define DateTime_GetMonthCalColor(hdp, iColor) \\ +#define DateTime_GetMonthCalColor(hdp, iColor) \ SendMessageA (hdp, DTM_GETMCCOLOR, iColor, 0) -#define DateTime_GetMonthCal(hdp) \\ +#define DateTime_GetMonthCal(hdp) \ (HWND) SendMessageA (hdp, DTM_GETMONTHCAL, 0, 0) -#define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) \\ +#define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) \ SendMessageA (hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw) -#define DateTime_GetMonthCalFont(hdp) \\ +#define DateTime_GetMonthCalFont(hdp) \ SendMessageA (hdp, DTM_GETMCFONT, 0, 0) diff --git a/tools/wrc/CHANGES b/tools/wrc/CHANGES index d839814d2e4..f3bb86f92a2 100644 --- a/tools/wrc/CHANGES +++ b/tools/wrc/CHANGES @@ -1,3 +1,23 @@ +--------------------------------------------------------------------------- +Version 1.0.14 (08-Aug-1999) + +Bertho Stultiens +- Deeply ashamed that I thought that flex had a bug. Of course my own fault + not recognizing unmatched text in start condition yyrcd and pp_strip[ps]. + There is a catch all rule now in the flexer with a warning to mark the + condition and promptly revealed errors in the wine-headers. + +--------------------------------------------------------------------------- +Version 1.0.13 (08-Aug-1999) + +Bertho Stultiens +- Fixed uppercase conversion of titles in dialog controls which was + introduced with the icon changes. +- Fixed strings longer than 1024 bytes/shorts by autosizing the array. A + warning is issued whenever more than 64k is allocated. +- Made a workarround for a flex bug where an ECHO put '\\' and '\n' + characters on the screen. + --------------------------------------------------------------------------- Version 1.0.12 (18-Jul-1999) diff --git a/tools/wrc/genres.c b/tools/wrc/genres.c index 248133123a0..097a031ef2c 100644 --- a/tools/wrc/genres.c +++ b/tools/wrc/genres.c @@ -457,7 +457,7 @@ res_t *dialog2res(name_id_t *name, dialog_t *dlg) else internal_error(__FILE__, __LINE__, "Control has no control-class"); if(ctrl->title) - put_name_id(res, ctrl->title, TRUE); + put_name_id(res, ctrl->title, FALSE); else put_word(res, 0); if(ctrl->extra) @@ -634,7 +634,7 @@ res_t *dialogex2res(name_id_t *name, dialogex_t *dlgex) else internal_error(__FILE__, __LINE__, "Control has no control-class"); if(ctrl->title) - put_name_id(res, ctrl->title, TRUE); + put_name_id(res, ctrl->title, FALSE); else put_word(res, 0); if(ctrl->extra) diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l index daa93a891de..494a38fc208 100644 --- a/tools/wrc/parser.l +++ b/tools/wrc/parser.l @@ -126,10 +126,12 @@ string_t *make_filename(char *s, int len); int line_number = 1; /* The current line */ int char_number = 1; /* The current char pos within the line */ -static char cbuffer[1024]; /* Buffers for string collection */ +static char *cbuffer; /* Buffers for string collection */ static int cbufidx; -static short wbuffer[1024]; +static int cbufalloc = 0; +static short *wbuffer; static int wbufidx; +static int wbufalloc = 0; static int want_nl = 0; /* Set when newline needs to go to parser */ static int want_ident = 0; /* Set is #ifdef, #ifndef or defined is seen */ static int stripslevel = 0; /* Count {} during pp_strips mode */ @@ -551,7 +553,8 @@ void add_to_substtext(char *text, int len) \{ stripslevel++; \} stripslevel--; ; if(!stripslevel) pop_start(); -[^\{\};\n#]* ; /* Ignore rest */ +\/[^*\n] ; /* To catch comments */ +[^\{\};\n#/]* ; /* Ignore rest */ \( stripplevel++; \) { @@ -562,7 +565,8 @@ void add_to_substtext(char *text, int len) push_to(pp_stripp_final); } } -[^\(\);\n#]* ; /* Ignore rest */ +\/[^*\n] ; /* To catch comments */ +[^\(\);\n#/]* ; /* Ignore rest */ {ws}* ; /* Ignore */ ; pop_start(); /* Kill the semicolon */ @@ -753,7 +757,7 @@ L\" { \"\" addcchar('\"'); /* "bla""bla" -> "bla\"bla" */ \\\"\" addcchar('\"'); /* "bla\""bla" -> "bla\"bla" */ \"{ws}+\" ; /* "bla" "bla" -> "blabla" */ - +. yywarning("Matched %c"); \' { @@ -774,9 +778,10 @@ L\" { addcchar((char)result); } {ws}+ ; /* Ignore space */ +\n line_number++; char_number = 1; . yyerror("Malformed data-line"); -"/*" push_to(comment); /* Eat comment */ +"/*" push_to(comment); /* Eat comment */ [^*\n]* ; "*"+[^*/\n]* ; \n line_number++; char_number = 1; @@ -810,6 +815,18 @@ L\" { } yy_delete_buffer(b); } + +<*>.|\n { + /* Catch all rule to find any unmatched text */ + if(*yytext == '\n') + { + line_number++; + char_number = 1; + } + yywarning("Unmatched text '%c' (0x%02x) YY_START=%d", + isprint(*yytext) ? *yytext : '.', *yytext, YY_START); + } + %% #ifndef yywrap @@ -830,15 +847,34 @@ int yywrap(void) */ void addcchar(char c) { - if(cbufidx >= sizeof(cbuffer)) - internal_error(__FILE__, __LINE__, "Character buffer overflow"); + if(cbufidx >= cbufalloc) + { + cbufalloc += 1024; + cbuffer = xrealloc(cbuffer, cbufalloc * sizeof(cbuffer[0])); + if(cbufalloc > 65536) + yywarning("Reallocating string buffer larger than 64kB"); + } cbuffer[cbufidx++] = c; } void addwchar(short s) { - if(wbufidx >= sizeof(wbuffer)) - internal_error(__FILE__, __LINE__, "Wide character buffer overflow"); + if(wbufidx >= wbufalloc) + { + wbufalloc += 1024; + wbuffer = xrealloc(wbuffer, wbufalloc * sizeof(wbuffer[0])); + if(wbufalloc > 65536) + yywarning("Reallocating wide string buffer larger than 64kB"); + } + + /* + * BS 08-Aug-1999 FIXME: The '& 0xff' is probably a bug, but I have + * not experienced it yet and I seem to remember that this was for + * a reason. But, as so many things you tend to forget why. + * I guess that there were problems due to the sign extension of + * shorts WRT chars (e.g. 0x80 becomes 0xff80 instead of 0x0080). + * This should then be fixed in the lexer calling the function. + */ wbuffer[wbufidx++] = (short)(s & 0xff); } diff --git a/tools/wrc/wrc.h b/tools/wrc/wrc.h index 7037b6c2135..0d586e2593e 100644 --- a/tools/wrc/wrc.h +++ b/tools/wrc/wrc.h @@ -12,8 +12,8 @@ #include "wrctypes.h" #endif -#define WRC_VERSION "1.0.12" -#define WRC_RELEASEDATE "(18-Jul-1999)" +#define WRC_VERSION "1.0.14" +#define WRC_RELEASEDATE "(08-Aug-1999)" #define WRC_FULLVERSION WRC_VERSION " " WRC_RELEASEDATE /* Only used in heavy debugging sessions */