Set eol-style
Modified: vendor/wine/tools/wrc/current/CHANGES Modified: vendor/wine/tools/wrc/current/parser.l Modified: vendor/wine/tools/wrc/current/parser.y Modified: vendor/wine/tools/wrc/current/wrc.doc Modified: vendor/wine/tools/wrc/current/wrc.man
--- vendor/wine/tools/wrc/current/CHANGES 2005-02-19 22:19:39 UTC (rev 13649) +++ vendor/wine/tools/wrc/current/CHANGES 2005-02-19 22:21:25 UTC (rev 13650) @@ -1,336 +1,336 @@
----------------------------------------------------------------------------
-Version 1.1.9 (31-Dec-2000)
-
-Ulrich Weigand <weigand@informatik.uni-erlangen.de>
-- Fixed a byteorder conversion problem with message tables.
-- Carefully read and write (possibly) misaligned data elements
- to avoid crashes on architectures where this is not allowed.
-
----------------------------------------------------------------------------
-Version 1.1.8 (24-Aug-2000)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Fixed a LALR(2) problem while scanning usertype resources which
- had identifiers for both name and type.
-
----------------------------------------------------------------------------
-Version 1.1.7 (24-Jul-2000)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Implemented a bug-work-arround for Berkeley yacc (byacc) which
- does not generate proper default transition rules for non-terminals.
- See comments in parser.y how the fix works.
-- Changed the error-line/char position to make emacs happy parsing
- the position of the error.
-- Added comments in the documentation in which order the line-numer
- and character-position of the error is written.
-
----------------------------------------------------------------------------
-Version 1.1.6 (05-Jun-2000)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Bugfix: Macro expansion of strings would assert an internal error
- or a segfault due to a lacking '\0' in the expansion.
-- Bugfix: Prevent buffer overflow in reallocation of macro expansion
- buffers.
-- Bugfix: Wrc's version information was not passed as numerical to the
- preprocessor due to an error in the definition of the macro.
-- Relaxed the newline constraint in global LANGUAGE statements, which
- was introduced in version 1.1.3, so that some fancy preprocessor
- constructs can work.
-- Removed the gcc-style #line handling from the resource-parser to the
- resource-scanner so that it is possible to include files at any stage
- of the source, independent of the parser-state.
-- Bugfix: Stringtables were not correctly searched for duplicates
- because the language comparison disregarded the sublanguage.
-- Eliminated a repetitive warning when writing stringtables with zero
- length string entries. These are perfectly valid (but make no sense:-).
- Warning are now only generated during parse in pedantic mode.
-
----------------------------------------------------------------------------
-Version 1.1.5 (12-Jun-2000)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Bugfix: Corrected "off by one" error in the linenumber while parsing
- resource.
-- Bugfix: A segfault would occur if messagetables were parsed without
- memory options attached. Also added buffer-overflow safeguard while
- converting between byteorders.
-- Finished remapping usertype resources onto standars types by tricking
- the parser into accepting a different token. The remapping can be
- disabled with a new commandline option '-m'.
-- Resolved some warning about chars used as index on SGI O2 machine
- (the ctype isXXX() routines are macros there).
-
----------------------------------------------------------------------------
-Version 1.1.4 (07-Jun-2000)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Implemented MESSAGETABLE resource type.
-- Usertype resources that cause a type-clash with defined resources
- are now detected and a warning is generated. Some types should be
- rerouted through other code so that they will be (re-)interpreted.
-- Bugfix: Line-continuation in strings in resources include a newline.
- This `feature' got deleted with the builtin preprocessor, but has been
- put back into place (see last changes comment from version 1.1.0).
-- Bugfix: The preprocessor now correctly will see "\\\r\n" as a line-
- continuation.
-- Bugfix: Assemblers on some platforms do not use 16bit quantities
- for `.word'. This directive is now changed into `.short'.
-- All types that accept inline data definitions (a la RCDATA) now
- also accept a file specification. This unifies the structure a bit.
-
----------------------------------------------------------------------------
-Version 1.1.3 (21-May-2000)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Implemented animated cursors and icons resource types.
-- Added partial support for font resources (user supplied fontdir is
- required).
-- All resources with inline data (a la RCDATA) now support language,
- version and characteristics data.
-- Implemented resource name duplicate checks. It is now an error if
- two resources of the same type have the same name.
-- Bugfix: Language propagation was not correct when .res files were
- generated.
-- Bugfix: VERSIONINFO now handles memory options.
-- Bugfix: resource names and the resource type may be equal (e.g. MENU
- MENU {...}). This support was mistakingly deleted in the upgrade to
- the builtin preprocessor.
- The standalone LANGUAGE setting became context sensitive as a consequence
- of this. Now it *must* end with a newline *after* both expressions and
- no newlines are allowed within the line (the statement must fit on one
- line). This is no practical problem though.
-
-Patrik Stridvall <ps@leissner.se>
-- Fixed byte order on Solaris and FreeBSD.
-
----------------------------------------------------------------------------
-Version 1.1.2 (08-May-2000)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Bugfix: Corrected a SEGV in the rawdata handling. Mistakingly took the
- address of a pointer instead of its value. This probably slipped in
- during the merge of my tree into the winetree.
- Lesson learned: always double check.
-- Verified most resources so that win16 compile also generates correct
- output for reversed endian.
-
----------------------------------------------------------------------------
-Version 1.1.1 (07-May-2000)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Implemented byte-ordering for resources. All resources can be forced
- to be little-, big- or native endian with command-line option -B.
-- Reading resources from .res-files are only accepted in native byte-
- ordering so that no additional semantic analysis is required.
-- Resource directory is still written in native-only format, including
- the strings.
-- Wrc is now installed through the makefile with 'make install' and also
- uninstalled with 'make uninstall'.
-- Wrote a man-page for better reference. The manpage also gets installed
- and uninstalled.
-- Cleaned up the namespace a bit by more agressive use of static.
-
----------------------------------------------------------------------------
-Version 1.1.0 (01-May-2000)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Implemented a new preprocessor that is (nearly) ANSI-C compliant. The
- old parser has been stripped from the old preprocessor-code which
- cleaned up both resource-scanner and -parser.
-- Standard defines have been introduced (see README.wrc)
-- Both preprocessor- and resource-scanner have been optimized slightly
- so that no backing up is required (one char lookahead is enough).
-- Filename-scanning has been cleaned up, though not perfect yet.
-- User-type resources are compatible now.
-- Line-continuation in strings is corrected so that it does not
- introduce a newline in the output.
-
----------------------------------------------------------------------------
-Version 1.0.18 (28-Dec-1999)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Bugfix: The named resources were not named correctly for indirectly
- addressable resources, which resulted in an undefined variable. The
- previous fix was incomplete (I was probably sleeping while I made it).
-
----------------------------------------------------------------------------
-Version 1.0.17 (20-Dec-1999)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Bugfix: Named resources of different types generated the same assembly-
- label twice, resulting in a compile failure.
-
----------------------------------------------------------------------------
-Version 1.0.16 (6-Nov-1999)
-
-Juergen.Schmied@debitel.net
-- Bugfix: Styles were evaluated as expressions. The NOT in combination
- with style flags was not overwriting the default styles like WS_VISIBLE.
- Solved by introducing own rules for parsing styles.
-
----------------------------------------------------------------------------
-Version 1.0.15 (13-Aug-1999)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Bugfix: IDs were not checked which resulted in numbers > 2^16-1 being
- accepted as IDs. This resulted in duplicate IDs and all other sort of
- trouble.
-
----------------------------------------------------------------------------
-Version 1.0.14 (08-Aug-1999)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- 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 <bertho@akhphd.au.dk>
-- 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)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Generalized the distinction between 2 and 4 byte integers slightly through
- a new parser state. The is now a warning when a 2 byte integer is larger
- than 16 bit (and is truncated).
-- Fixed a couple of cosmetic things in the DLGINIT stuff so that dumping of
- this type will work as expected.
-- Added generalized language/version/characteristics support to the DLGINIT
- resource type.
-
-Ulrich Czekalla <ulrichc@corel.ca>
-- Added support for DLGINIT resource-type.
-- Added string continuation and embedded quoting.
-- Added numeric IDs for icons in controls.
-
-Eric Pouech <Eric.Pouech@wanadoo.fr>
-- Bugfix: Distinguish between 2 and 4 byte integers in RCDATA.
-
----------------------------------------------------------------------------
-Version 1.0.11 (22-Apr-1999)
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Fixed a counting bug in the win32 count and sort routine.
-- Fixed sort order of resources (must be name before ordinal).
-- Shuffled a couple of global variables so that built-in dlls now can
- load resources through the proper PE interface.
-
----------------------------------------------------------------------------
-Version 1.0.10 (18-Feb-1999)
-
-Alexandre Julliard <julliard@lrc.epfl.ch>
-- Fixed the TIME_LONG ugliness.
-
-David Luyer <luyer@ucs.uwa.edu.au>
-- Added string.h include in newstruc.c for compilation on 64bit platforms.
-- Added TIME_LONG to support time_t==int in printf formats on alpha
- platforms.
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Added some more use of TIME_LONG in implicit format used in header-file
- generation.
-- Removed the windows.h include and replaced it with wintypes.h in
- wrctypes.h and added winuser.h in two other sources. This cuts compilation
- time by a factor of 2 and final executable size with debug by a factor 2.5.
-
----------------------------------------------------------------------------
-Version 1.0.9 (01-Feb-1999)
-
-Albert den Haan <albertd@corel.ca>:
-- Fixed wrong order of res_ico and res_bmp which must be in RT_xxx order.
-
----------------------------------------------------------------------------
-Version 1.0.8 (10-Jan-1999)
-
-Albert den Haan <albertd@corel.ca>:
-- Added TOOLBAR support.
-- Buffer overflow fix in strncpyWtoA.
-- Open embedded files in resource definitions through the include path from
- the commandline.
-- Support named icons in dialogs with unquoted names
-
-Bertho Stultiens <bertho@akhphd.au.dk>
-- Fixed a major bug in the language propagation in the parser. The parser
- did not copy the current language while binding it to a resource structure
- causing wrong sorting if multiple global languages were in use and was a
- potential segfault because the pointer might not be valid.
-- Added language/version/characteristics support for toolbar.
-- Moved some defines from wrc.h to wrctypes.h to support in toolbars.
-- Removed function stricmp from source and replaced with native function
- strcasecmp.
-- Allocate cursor and icon ordinals according to the language of the item to
- decrease the amount of ordinals in use. This reduces the resource
- directory size by reducing the tree size.
-- Versions 1.0.5 through 1.0.7 were never commited to cvs but were available
- for download from an alternate site for elf-dll test generation.
-
----------------------------------------------------------------------------
-Version 1.0.7 (19-Dec-1998)
-- Changed a couple of labels that are used by dllglue. Also reversed a patch
- that made wrc's generated code dependent on dllglue's code.
-
----------------------------------------------------------------------------
-Version 1.0.6 (12-Dec-1998)
-- Fixed the _PEResTab table where incorrect RVA's were put in the table.
- The dllglue should now be merged into wrc for correct labels and the least
- number of loadtime fixups.
-
----------------------------------------------------------------------------
-Version 1.0.5 (12-Dec-1998)
-- Fixed an omited .globl statement for dllglue linking.
-
----------------------------------------------------------------------------
-Version 1.0.4 (10-Dec-1998)
-- Added a global label for elf-dll linking and a long with the resource
- size and a long with the directory size.
-- Killed an annoying warning since version 1.0.0 in parser.y about a
- var being used before init.
-
----------------------------------------------------------------------------
-Version 1.0.3 (02-Nov-1998)
-- Bugfix in write_name_str() [writeres.c] where the length byte/word was
- wrongly counted in the length of the string.
- Thanks to Ulrich Weigand <weigand@informatik.uni-erlangen.de>
-
----------------------------------------------------------------------------
-Version 1.0.2 (20-Jun-1998)
-- Started this file
-- Fixed a bug in filename scanning when they are double quoted. The code now
- is compatible with MS' rc and Borland's brc. There is a compromise in the
- filenames because of case-sensitivity under *nix.
-- Backslashes in a filepath are now converted to forward slashes and double
-- Fixed a bug in printing the filename if loading of a file should fail.
- backslashes are converted to single forward slash.
-- Added -L option to prevent conversion to lower case for embedded filenames
- in resource statements.
-- Added language posibilities to icons and cursors so that the current
- language is put into the .res ans .s file.
-- Added character position indication of an error.
-- Fixed CLASS statement so that it accepts double quoted strings as class
- argument. This seems to be the correct behaviour (see SDK). The unquoted
- class-name is still supported because it seems a reasonable option.
-- Fixed accelerators with CONTROL option set so that they generate correct
- code instead of generating an error.
-- Added testing for flex version 2.5 or better because wrc needs the
- yy_scan* functions to do preprocessing.
-
----------------------------------------------------------------------------
-Version 1.0.1 (08-Jun-1998)
-- Added -A commandline option to generate autoregister code for the winelib
- programs.
-
----------------------------------------------------------------------------
-Version 1.0.0 (28-May-1998)
-- Initial release
+---------------------------------------------------------------------------
+Version 1.1.9 (31-Dec-2000)
+
+Ulrich Weigand <weigand@informatik.uni-erlangen.de>
+- Fixed a byteorder conversion problem with message tables.
+- Carefully read and write (possibly) misaligned data elements
+ to avoid crashes on architectures where this is not allowed.
+
+---------------------------------------------------------------------------
+Version 1.1.8 (24-Aug-2000)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Fixed a LALR(2) problem while scanning usertype resources which
+ had identifiers for both name and type.
+
+---------------------------------------------------------------------------
+Version 1.1.7 (24-Jul-2000)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Implemented a bug-work-arround for Berkeley yacc (byacc) which
+ does not generate proper default transition rules for non-terminals.
+ See comments in parser.y how the fix works.
+- Changed the error-line/char position to make emacs happy parsing
+ the position of the error.
+- Added comments in the documentation in which order the line-numer
+ and character-position of the error is written.
+
+---------------------------------------------------------------------------
+Version 1.1.6 (05-Jun-2000)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Bugfix: Macro expansion of strings would assert an internal error
+ or a segfault due to a lacking '\0' in the expansion.
+- Bugfix: Prevent buffer overflow in reallocation of macro expansion
+ buffers.
+- Bugfix: Wrc's version information was not passed as numerical to the
+ preprocessor due to an error in the definition of the macro.
+- Relaxed the newline constraint in global LANGUAGE statements, which
+ was introduced in version 1.1.3, so that some fancy preprocessor
+ constructs can work.
+- Removed the gcc-style #line handling from the resource-parser to the
+ resource-scanner so that it is possible to include files at any stage
+ of the source, independent of the parser-state.
+- Bugfix: Stringtables were not correctly searched for duplicates
+ because the language comparison disregarded the sublanguage.
+- Eliminated a repetitive warning when writing stringtables with zero
+ length string entries. These are perfectly valid (but make no sense:-).
+ Warning are now only generated during parse in pedantic mode.
+
+---------------------------------------------------------------------------
+Version 1.1.5 (12-Jun-2000)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Bugfix: Corrected "off by one" error in the linenumber while parsing
+ resource.
+- Bugfix: A segfault would occur if messagetables were parsed without
+ memory options attached. Also added buffer-overflow safeguard while
+ converting between byteorders.
+- Finished remapping usertype resources onto standars types by tricking
+ the parser into accepting a different token. The remapping can be
+ disabled with a new commandline option '-m'.
+- Resolved some warning about chars used as index on SGI O2 machine
+ (the ctype isXXX() routines are macros there).
+
+---------------------------------------------------------------------------
+Version 1.1.4 (07-Jun-2000)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Implemented MESSAGETABLE resource type.
+- Usertype resources that cause a type-clash with defined resources
+ are now detected and a warning is generated. Some types should be
+ rerouted through other code so that they will be (re-)interpreted.
+- Bugfix: Line-continuation in strings in resources include a newline.
+ This `feature' got deleted with the builtin preprocessor, but has been
+ put back into place (see last changes comment from version 1.1.0).
+- Bugfix: The preprocessor now correctly will see "\\\r\n" as a line-
+ continuation.
+- Bugfix: Assemblers on some platforms do not use 16bit quantities
+ for `.word'. This directive is now changed into `.short'.
+- All types that accept inline data definitions (a la RCDATA) now
+ also accept a file specification. This unifies the structure a bit.
+
+---------------------------------------------------------------------------
+Version 1.1.3 (21-May-2000)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Implemented animated cursors and icons resource types.
+- Added partial support for font resources (user supplied fontdir is
+ required).
+- All resources with inline data (a la RCDATA) now support language,
+ version and characteristics data.
+- Implemented resource name duplicate checks. It is now an error if
+ two resources of the same type have the same name.
+- Bugfix: Language propagation was not correct when .res files were
+ generated.
+- Bugfix: VERSIONINFO now handles memory options.
+- Bugfix: resource names and the resource type may be equal (e.g. MENU
+ MENU {...}). This support was mistakingly deleted in the upgrade to
+ the builtin preprocessor.
+ The standalone LANGUAGE setting became context sensitive as a consequence
+ of this. Now it *must* end with a newline *after* both expressions and
+ no newlines are allowed within the line (the statement must fit on one
+ line). This is no practical problem though.
+
+Patrik Stridvall <ps@leissner.se>
+- Fixed byte order on Solaris and FreeBSD.
+
+---------------------------------------------------------------------------
+Version 1.1.2 (08-May-2000)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Bugfix: Corrected a SEGV in the rawdata handling. Mistakingly took the
+ address of a pointer instead of its value. This probably slipped in
+ during the merge of my tree into the winetree.
+ Lesson learned: always double check.
+- Verified most resources so that win16 compile also generates correct
+ output for reversed endian.
+
+---------------------------------------------------------------------------
+Version 1.1.1 (07-May-2000)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Implemented byte-ordering for resources. All resources can be forced
+ to be little-, big- or native endian with command-line option -B.
+- Reading resources from .res-files are only accepted in native byte-
+ ordering so that no additional semantic analysis is required.
+- Resource directory is still written in native-only format, including
+ the strings.
+- Wrc is now installed through the makefile with 'make install' and also
+ uninstalled with 'make uninstall'.
+- Wrote a man-page for better reference. The manpage also gets installed
+ and uninstalled.
+- Cleaned up the namespace a bit by more agressive use of static.
+
+---------------------------------------------------------------------------
+Version 1.1.0 (01-May-2000)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Implemented a new preprocessor that is (nearly) ANSI-C compliant. The
+ old parser has been stripped from the old preprocessor-code which
+ cleaned up both resource-scanner and -parser.
+- Standard defines have been introduced (see README.wrc)
+- Both preprocessor- and resource-scanner have been optimized slightly
+ so that no backing up is required (one char lookahead is enough).
+- Filename-scanning has been cleaned up, though not perfect yet.
+- User-type resources are compatible now.
+- Line-continuation in strings is corrected so that it does not
+ introduce a newline in the output.
+
+---------------------------------------------------------------------------
+Version 1.0.18 (28-Dec-1999)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Bugfix: The named resources were not named correctly for indirectly
+ addressable resources, which resulted in an undefined variable. The
+ previous fix was incomplete (I was probably sleeping while I made it).
+
+---------------------------------------------------------------------------
+Version 1.0.17 (20-Dec-1999)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Bugfix: Named resources of different types generated the same assembly-
+ label twice, resulting in a compile failure.
+
+---------------------------------------------------------------------------
+Version 1.0.16 (6-Nov-1999)
+
+Juergen.Schmied@debitel.net
+- Bugfix: Styles were evaluated as expressions. The NOT in combination
+ with style flags was not overwriting the default styles like WS_VISIBLE.
+ Solved by introducing own rules for parsing styles.
+
+---------------------------------------------------------------------------
+Version 1.0.15 (13-Aug-1999)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Bugfix: IDs were not checked which resulted in numbers > 2^16-1 being
+ accepted as IDs. This resulted in duplicate IDs and all other sort of
+ trouble.
+
+---------------------------------------------------------------------------
+Version 1.0.14 (08-Aug-1999)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- 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 <bertho@akhphd.au.dk>
+- 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)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Generalized the distinction between 2 and 4 byte integers slightly through
+ a new parser state. The is now a warning when a 2 byte integer is larger
+ than 16 bit (and is truncated).
+- Fixed a couple of cosmetic things in the DLGINIT stuff so that dumping of
+ this type will work as expected.
+- Added generalized language/version/characteristics support to the DLGINIT
+ resource type.
+
+Ulrich Czekalla <ulrichc@corel.ca>
+- Added support for DLGINIT resource-type.
+- Added string continuation and embedded quoting.
+- Added numeric IDs for icons in controls.
+
+Eric Pouech <Eric.Pouech@wanadoo.fr>
+- Bugfix: Distinguish between 2 and 4 byte integers in RCDATA.
+
+---------------------------------------------------------------------------
+Version 1.0.11 (22-Apr-1999)
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Fixed a counting bug in the win32 count and sort routine.
+- Fixed sort order of resources (must be name before ordinal).
+- Shuffled a couple of global variables so that built-in dlls now can
+ load resources through the proper PE interface.
+
+---------------------------------------------------------------------------
+Version 1.0.10 (18-Feb-1999)
+
+Alexandre Julliard <julliard@lrc.epfl.ch>
+- Fixed the TIME_LONG ugliness.
+
+David Luyer <luyer@ucs.uwa.edu.au>
+- Added string.h include in newstruc.c for compilation on 64bit platforms.
+- Added TIME_LONG to support time_t==int in printf formats on alpha
+ platforms.
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Added some more use of TIME_LONG in implicit format used in header-file
+ generation.
+- Removed the windows.h include and replaced it with wintypes.h in
+ wrctypes.h and added winuser.h in two other sources. This cuts compilation
+ time by a factor of 2 and final executable size with debug by a factor 2.5.
+
+---------------------------------------------------------------------------
+Version 1.0.9 (01-Feb-1999)
+
+Albert den Haan <albertd@corel.ca>:
+- Fixed wrong order of res_ico and res_bmp which must be in RT_xxx order.
+
+---------------------------------------------------------------------------
+Version 1.0.8 (10-Jan-1999)
+
+Albert den Haan <albertd@corel.ca>:
+- Added TOOLBAR support.
+- Buffer overflow fix in strncpyWtoA.
+- Open embedded files in resource definitions through the include path from
+ the commandline.
+- Support named icons in dialogs with unquoted names
+
+Bertho Stultiens <bertho@akhphd.au.dk>
+- Fixed a major bug in the language propagation in the parser. The parser
+ did not copy the current language while binding it to a resource structure
+ causing wrong sorting if multiple global languages were in use and was a
+ potential segfault because the pointer might not be valid.
+- Added language/version/characteristics support for toolbar.
+- Moved some defines from wrc.h to wrctypes.h to support in toolbars.
+- Removed function stricmp from source and replaced with native function
+ strcasecmp.
+- Allocate cursor and icon ordinals according to the language of the item to
+ decrease the amount of ordinals in use. This reduces the resource
+ directory size by reducing the tree size.
+- Versions 1.0.5 through 1.0.7 were never commited to cvs but were available
+ for download from an alternate site for elf-dll test generation.
+
+---------------------------------------------------------------------------
+Version 1.0.7 (19-Dec-1998)
+- Changed a couple of labels that are used by dllglue. Also reversed a patch
+ that made wrc's generated code dependent on dllglue's code.
+
+---------------------------------------------------------------------------
+Version 1.0.6 (12-Dec-1998)
+- Fixed the _PEResTab table where incorrect RVA's were put in the table.
+ The dllglue should now be merged into wrc for correct labels and the least
+ number of loadtime fixups.
+
+---------------------------------------------------------------------------
+Version 1.0.5 (12-Dec-1998)
+- Fixed an omited .globl statement for dllglue linking.
+
+---------------------------------------------------------------------------
+Version 1.0.4 (10-Dec-1998)
+- Added a global label for elf-dll linking and a long with the resource
+ size and a long with the directory size.
+- Killed an annoying warning since version 1.0.0 in parser.y about a
+ var being used before init.
+
+---------------------------------------------------------------------------
+Version 1.0.3 (02-Nov-1998)
+- Bugfix in write_name_str() [writeres.c] where the length byte/word was
+ wrongly counted in the length of the string.
+ Thanks to Ulrich Weigand <weigand@informatik.uni-erlangen.de>
+
+---------------------------------------------------------------------------
+Version 1.0.2 (20-Jun-1998)
+- Started this file
+- Fixed a bug in filename scanning when they are double quoted. The code now
+ is compatible with MS' rc and Borland's brc. There is a compromise in the
+ filenames because of case-sensitivity under *nix.
+- Backslashes in a filepath are now converted to forward slashes and double
+- Fixed a bug in printing the filename if loading of a file should fail.
+ backslashes are converted to single forward slash.
+- Added -L option to prevent conversion to lower case for embedded filenames
+ in resource statements.
+- Added language posibilities to icons and cursors so that the current
+ language is put into the .res ans .s file.
+- Added character position indication of an error.
+- Fixed CLASS statement so that it accepts double quoted strings as class
+ argument. This seems to be the correct behaviour (see SDK). The unquoted
+ class-name is still supported because it seems a reasonable option.
+- Fixed accelerators with CONTROL option set so that they generate correct
+ code instead of generating an error.
+- Added testing for flex version 2.5 or better because wrc needs the
+ yy_scan* functions to do preprocessing.
+
+---------------------------------------------------------------------------
+Version 1.0.1 (08-Jun-1998)
+- Added -A commandline option to generate autoregister code for the winelib
+ programs.
+
+---------------------------------------------------------------------------
+Version 1.0.0 (28-May-1998)
+- Initial release
Property changes on: vendor/wine/tools/wrc/current/CHANGES ___________________________________________________________________ Name: svn:eol-style + native
--- vendor/wine/tools/wrc/current/parser.l 2005-02-19 22:19:39 UTC (rev 13649) +++ vendor/wine/tools/wrc/current/parser.l 2005-02-19 22:21:25 UTC (rev 13650) @@ -1,682 +1,682 @@
-/* -*-C-*- - * - * Copyright 1998-2000 Bertho A. Stultiens (BS) - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * History: - * 21-May-2000 BS - Fixed the ident requirement of resource names - * which can be keywords. - * 30-Apr-2000 BS - Reintegration into the wine-tree - * 11-Jan-2000 BS - Very drastic cleanup because we don't have a - * preprocessor in here anymore. - * 02-Jan-2000 BS - Removed the preprocessor code - * 23-Dec-1999 BS - Removed the copyright for Martin von Loewis. - * There is really nothing left of his code in - * this parser. - * 20-Jun-1998 BS - Changed the filename conversion. Filenames are - * case-sensitive inder *nix, but not under dos. - * default behaviour is to convert to lower case. - * - All backslashes are converted to forward and - * both single and double slash is recognized as - * MS/Borland does. - * - Fixed a bug in 'yywf' case that prevented - * double quoted names to be scanned propperly. - * - * 19-May-1998 BS - Started to build a preprocessor. - * - Changed keyword processing completely to - * table-lookups. - * - * 20-Apr-1998 BS - Added ';' comment stripping - * - * 17-Apr-1998 BS - Made the win32 keywords optional when compiling in - * 16bit mode - * - * 15-Apr-1998 BS - Changed string handling to include escapes - * - Added unicode string handling (no codepage - * translation though). - * - 'Borrowed' the main idea of string scanning from - * the flex manual pages. - * - Added conditional handling of scanning depending - * on the state of the parser. This was mainly required - * to distinguish a file to load or raw data that - * follows. MS's definition of filenames is rather - * complex... It can be unquoted or double quoted. If - * double quoted, then the '\\' char is not automatically - * escaped according to Borland's rc compiler, but it - * accepts both "\\path\\file.rc" and "\path\file.rc". - * This makes life very hard! I go for the escaped - * version, as this seems to be the documented way... - * - Single quoted strings are now parsed and converted - * here. - * - Added comment stripping. The implementation is - * 'borrowed' from the flex manpages. - * - Rebuild string processing so that it may contain - * escaped '\0'. - */ - -/* Exclusive string handling */ -%x yystr -/* Exclusive unicode string handling */ -%x yylstr -/* Exclusive rcdata single quoted data handling */ -%x yyrcd -/* Exclusive comment eating... */ -%x comment -/* Set when stripping c-junk */ -%x pp_stripe -%x pp_strips -%x pp_stripp -%x pp_stripp_final -/* Set when scanning #line style directives */ -%x pp_line -/* Set when scanning #pragma */ -%x pp_pragma -%x pp_code_page - -%option stack -%option never-interactive - -/* Some shortcut definitions */ -ws [ \f\t\r] -cident [a-zA-Z_][0-9a-zA-Z_]* - -%{ - -/*#define LEX_DEBUG*/ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> -#include <assert.h> - -#include "wine/unicode.h" -#include "wrc.h" -#include "utils.h" -#include "parser.h" -#include "newstruc.h" - -#include "y.tab.h" - -#define YY_USE_PROTOS -#define YY_NO_UNPUT -#define YY_NO_TOP_STATE - -/* Always update the current character position within a line */ -#define YY_USER_ACTION char_number+=yyleng; wanted_id = want_id; want_id = 0; - -static void addcchar(char c); -static void addwchar(WCHAR s); -static string_t *get_buffered_cstring(void); -static string_t *get_buffered_wstring(void); -static string_t *make_string(char *s); - -static char *cbuffer; /* Buffers for string collection */ -static int cbufidx; -static int cbufalloc = 0; -static WCHAR *wbuffer; -static int wbufidx; -static int wbufalloc = 0; -static int stripslevel = 0; /* Count {} during pp_strips/pp_stripe mode */ -static int stripplevel = 0; /* Count () during pp_strips mode */ -static int cjunk_tagline; /* Where did we start stripping (helps error tracking) */ - -static int current_codepage = -1; /* use language default */ - -/* - * This one is a bit tricky. - * We set 'want_id' in the parser to get the first - * identifier we get across in the scanner, but we - * also want it to be reset at nearly any token we - * see. Exceptions are: - * - newlines - * - comments - * - whitespace - * - * The scanner will automatically reset 'want_id' - * after *each* scanner reduction and puts is value - * into the var below. In this way we can see the - * state after the YY_RULE_SETUP (i.e. the user action; - * see above) and don't have to worry too much when - * it needs to be reset. - */ -static int wanted_id = 0; -static int save_wanted_id; /* To save across comment reductions */ - -struct keyword { - const char *keyword; - int token; - int isextension; - int needcase; - int alwayskw; -}; - -static struct keyword keywords[] = { - { "ACCELERATORS", tACCELERATORS, 0, 0, 0}, - { "ALT", tALT, 0, 0, 0}, - { "ASCII", tASCII, 0, 0, 0}, - { "AUTO3STATE", tAUTO3STATE, 1, 0, 0}, - { "AUTOCHECKBOX", tAUTOCHECKBOX, 1, 0, 0}, - { "AUTORADIOBUTTON", tAUTORADIOBUTTON, 1, 0, 0}, - { "BEGIN", tBEGIN, 0, 0, 0}, - { "BITMAP", tBITMAP, 0, 0, 0}, - { "BLOCK", tBLOCK, 0, 0, 0}, - { "BUTTON", tBUTTON, 1, 0, 0}, - { "CAPTION", tCAPTION, 0, 0, 0}, - { "CHARACTERISTICS", tCHARACTERISTICS, 1, 0, 0}, - { "CHECKBOX", tCHECKBOX, 0, 0, 0}, - { "CHECKED", tCHECKED, 0, 0, 0}, - { "CLASS", tCLASS, 0, 0, 0}, - { "COMBOBOX", tCOMBOBOX, 0, 0, 0}, - { "CONTROL", tCONTROL, 0, 0, 0}, - { "CTEXT", tCTEXT, 0, 0, 0}, - { "CURSOR", tCURSOR, 0, 0, 0}, - { "DEFPUSHBUTTON", tDEFPUSHBUTTON, 0, 0, 0}, - { "DIALOG", tDIALOG, 0, 0, 0}, - { "DIALOGEX", tDIALOGEX, 1, 0, 0}, - { "DISCARDABLE", tDISCARDABLE, 0, 0, 0}, - { "DLGINIT", tDLGINIT, 0, 0, 0}, - { "EDITTEXT", tEDITTEXT, 0, 0, 0}, - { "END", tEND, 0, 0, 0}, - { "EXSTYLE", tEXSTYLE, 0, 0, 0}, - { "FILEFLAGS", tFILEFLAGS, 0, 0, 0}, - { "FILEFLAGSMASK", tFILEFLAGSMASK, 0, 0, 0}, - { "FILEOS", tFILEOS, 0, 0, 0}, - { "FILESUBTYPE", tFILESUBTYPE, 0, 0, 0}, - { "FILETYPE", tFILETYPE, 0, 0, 0}, - { "FILEVERSION", tFILEVERSION, 0, 0, 0}, - { "FIXED", tFIXED, 0, 0, 0}, - { "FONT", tFONT, 0, 0, 0}, - { "FONTDIR", tFONTDIR, 0, 0, 0}, /* This is a Borland BRC extension */ - { "GRAYED", tGRAYED, 0, 0, 0}, - { "GROUPBOX", tGROUPBOX, 0, 0, 0}, - { "HELP", tHELP, 0, 0, 0}, - { "ICON", tICON, 0, 0, 0}, - { "IMPURE", tIMPURE, 0, 0, 0}, - { "INACTIVE", tINACTIVE, 0, 0, 0}, - { "LANGUAGE", tLANGUAGE, 1, 0, 1}, - { "LISTBOX", tLISTBOX, 0, 0, 0}, - { "LOADONCALL", tLOADONCALL, 0, 0, 0}, - { "LTEXT", tLTEXT, 0, 0, 0}, - { "MENU", tMENU, 0, 0, 0}, - { "MENUBARBREAK", tMENUBARBREAK, 0, 0, 0}, - { "MENUBREAK", tMENUBREAK, 0, 0, 0}, - { "MENUEX", tMENUEX, 1, 0, 0}, - { "MENUITEM", tMENUITEM, 0, 0, 0}, - { "MESSAGETABLE", tMESSAGETABLE, 1, 0, 0}, - { "MOVEABLE", tMOVEABLE, 0, 0, 0}, - { "NOINVERT", tNOINVERT, 0, 0, 0}, - { "NOT", tNOT, 0, 0, 0}, - { "POPUP", tPOPUP, 0, 0, 0}, - { "PRELOAD", tPRELOAD, 0, 0, 0}, - { "PRODUCTVERSION", tPRODUCTVERSION, 0, 0, 0}, - { "PURE", tPURE, 0, 0, 0}, - { "PUSHBUTTON", tPUSHBUTTON, 0, 0, 0}, - { "RADIOBUTTON", tRADIOBUTTON, 0, 0, 0}, - { "RCDATA", tRCDATA, 0, 0, 0}, - { "RTEXT", tRTEXT, 0, 0, 0}, - { "SCROLLBAR", tSCROLLBAR, 0, 0, 0}, - { "SEPARATOR", tSEPARATOR, 0, 0, 0}, - { "SHIFT", tSHIFT, 0, 0, 0}, - { "STATE3", tSTATE3, 1, 0, 0}, - { "STRING", tSTRING, 0, 0, 0}, - { "STRINGTABLE", tSTRINGTABLE, 0, 0, 1}, - { "STYLE", tSTYLE, 0, 0, 0}, - { "TOOLBAR", tTOOLBAR, 1, 0, 0}, - { "VALUE", tVALUE, 0, 0, 0}, - { "VERSION", tVERSION, 1, 0, 0}, - { "VERSIONINFO", tVERSIONINFO, 0, 0, 0}, - { "VIRTKEY", tVIRTKEY, 0, 0, 0} -}; - -#define NKEYWORDS (sizeof(keywords)/sizeof(keywords[0])) -#define KWP(p) ((const struct keyword *)(p)) -static int kw_cmp_func(const void *s1, const void *s2) -{ - int ret; - ret = strcasecmp(KWP(s1)->keyword, KWP(s2)->keyword); - if(!ret && (KWP(s1)->needcase || KWP(s2)->needcase)) - return strcmp(KWP(s1)->keyword, KWP(s2)->keyword); - else - return ret; -} - -#define KW_BSEARCH -#define DO_SORT -static struct keyword *iskeyword(char *kw) -{ - struct keyword *kwp; - struct keyword key; - key.keyword = kw; - key.needcase = 0; -#ifdef DO_SORT - { - /* Make sure that it is sorted for bsearsh */ - static int sorted = 0; - if(!sorted) - { - qsort(keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func); - sorted = 1; - } - } -#endif -#ifdef KW_BSEARCH - kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func); -#else - { - int i; - for(i = 0; i < NKEYWORDS; i++) - { - if(!kw_cmp_func(&key, &keywords[i])) - break; - } - if(i < NKEYWORDS) - kwp = &keywords[i]; - else - kwp = NULL; - } -#endif - - if(kwp == NULL || (kwp->isextension && !extensions)) - return NULL; - else - return kwp; -} - -%} - -/* - ************************************************************************** - * The flexer starts here - ************************************************************************** - */ -%% - /* - * Catch the GCC-style line statements here and parse them. - * This has the advantage that you can #include at any - * stage in the resource file. - * The preprocessor generates line directives in the format: - * # <linenum> "filename" <codes> - * - * Codes can be a sequence of:[truncated at 1000 lines; 7881 more skipped]