Commit Graph

58 Commits

Author SHA1 Message Date
Jacek Caban 0da8be91ef wrc: Allow '/' and '\' in identifiers. 2013-04-23 15:35:12 +02:00
Francois Gouget fac36c55e9 Assorted typo, spelling, wording and case fixes. 2012-05-15 16:26:43 +02:00
Alexandre Julliard 577f202d25 wrc: Only allow 7-bit ASCII characters in wide string constants. 2010-12-05 16:33:13 +01:00
Alexandre Julliard cdf6947080 wrc: Avoid use of toupper/isupper on signed chars. 2010-06-16 12:48:51 +02:00
Michael Stefaniuc b90a74c724 Revert "wrc: Use an EOF rule instead of lex_destroy for compatibility with prediluvian flex versions.".
This reverts commit 1405c00ecb.
Wine now requires a new enough flex version.
2009-12-30 13:36:19 +01:00
Alexandre Julliard da3ee66505 wrc: Include unistd.h before the Windows headers. 2009-10-06 16:18:04 +02:00
Francois Gouget b4e7155c1a wrc: Add a '\n' to a parser_warning() call. 2009-08-26 13:09:16 +02:00
Alexandre Julliard be7558fc30 wrc: Print a warning when encountering utf8 strings in non-utf8 codepage. 2009-08-20 15:33:03 +02:00
Alexandre Julliard fc8c8a5251 wrc: Report an error when encountering non-ASCII characters. 2009-07-16 11:15:15 +02:00
Alexandre Julliard 1405c00ecb wrc: Use an EOF rule instead of lex_destroy for compatibility with prediluvian flex versions. 2009-06-23 15:53:01 +02:00
Alexandre Julliard e25bc79da1 wrc: Add support for loading multiple input files at once. 2009-06-22 12:23:39 +02:00
Francois Gouget 28b97861b9 wrc: parser_error() does not need a trailing '\n'. 2008-11-25 11:50:15 +01:00
Huw Davies 2e3e696a2c wrc: Include errno.h. 2008-10-20 22:33:43 +02:00
Rob Shearman e3afab2691 wrc: Don't accept "0" as a valid codepage in "#pragma code_page" directives. 2008-10-20 11:37:27 +02:00
Rob Shearman d1c1543893 wrc: Check for overflows when parsing integer constants. 2008-10-18 19:33:28 +02:00
Alexandre Julliard 28a2179dd6 Add noinput directive to all lex files to avoid a compiler warning. 2008-07-07 12:31:33 +02:00
Alexandre Julliard 0a16b6b81f wrc: parser_error must append a newline. 2008-03-22 10:32:07 +01:00
Alexandre Julliard 41fbacefa1 Avoid the nounistd option that doesn't exist on older flex, define YY_NO_UNISTD_H instead. 2008-02-19 15:42:49 +01:00
Rob Shearman 878ea5d2e2 Add the nounistd option to all lex source files. 2008-02-19 13:39:25 +01:00
Francois Gouget 7e92283678 wrc: Modify the error, warning and tracing functions to behave like all the other Wine tracing methods, that is to not append a '\n' to the message. 2007-10-19 11:46:11 +02:00
Alexandre Julliard 549351ab09 wrc: Strip C code based on the name of the include file.
Get rid of the old C code stripping support that wasn't used anymore.
2007-06-28 14:10:07 +02:00
Alexandre Julliard 442243257b wrc: Added support for utf-8 codepage. 2007-01-09 22:21:53 +01:00
Alexandre Julliard 42418fbbe8 wrc: Change the prefix on bison-generated names to avoid the name-prefix directive. 2006-09-12 09:05:20 +02:00
Alexandre Julliard fce74f7411 wrc: Get rid of xmalloc casts. 2006-08-26 21:42:01 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Mike McCormack 69dcbaaf93 wrc: Don't use identifiers starting yy*, they're reserved for flex. 2006-03-06 17:50:52 +01:00
Alexandre Julliard 1e96455094 Remove YY_NO defines that cause warnings. 2006-01-05 12:20:05 +01:00
Alexandre Julliard 0ae2c69c7a Added some flex options to avoid compiler warnings.
Moved options from the Makefile into the source.
2006-01-03 12:16:05 +01:00
Alexandre Julliard cd91bc61be Now that we are requiring bison anyway, make the .tab.c file use the
same base name as the .y file, so that we can generate correct
dependencies in all cases.
2005-09-28 18:17:08 +00:00
Alexandre Julliard 52788d1f1c Added support for HTML resource type. 2005-06-30 20:58:52 +00:00
Jacek Caban 6580ae03ed '.' is a valid char of tIDENT. 2005-06-30 18:09:39 +00:00
Alexandre Julliard e7579ef3f6 Fixed line number handling for escaped end of lines inside strings. 2004-04-09 19:08:53 +00:00
Daniel Marmier 4034ff36c0 Fixed warnings with gcc option "-Wwrite-strings". 2003-10-14 01:19:27 +00:00
Alexandre Julliard 25fe361010 Added 'wine' prefix to libwine_unicode exports. 2003-03-21 21:30:51 +00:00
Dan Kegel 74e15940cc \ at EOL in string now behaves like in msvc6's rc. 2003-01-21 00:28:28 +00:00
Alexandre Julliard f22ba0560d Added support for #pragma code_page.
Fixed a few bugs in language handling.
Added error message when Ansi->Unicode conversion in the current
codepage loses information.
2002-08-15 21:57:36 +00:00
Alexandre Julliard b7d3c79beb Split the C preprocessor from wrc into a separate library.
Prefixed exported functions by 'pp' to avoid namespace conflicts.
2002-07-16 02:33:10 +00:00
Alexandre Julliard 7cae558bdc Removed some more trailing whitespace. 2002-06-01 02:55:48 +00:00
Alexandre Julliard 0799c1a780 Added LGPL standard comment, and copyright notices where necessary.
Global replacement of debugtools.h by wine/debug.h.
2002-03-09 23:29:33 +00:00
François Gouget 1425941e29 Fix the #include order for config.h.
Add #include "config.h" directives where needed.
2001-11-06 20:57:11 +00:00
Francois Gouget f0c20b2d87 Wrc no longer needs to parse C code. Remove c-junk handling code. 2001-06-06 21:04:07 +00:00
Francois Gouget e355ee2df1 Filenames may contain '/' and '\'.
Small typo fixes.
2000-09-24 03:02:12 +00:00
Bertho Stultiens 24b5050a7f - 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:-).
  Warnings are now only generated during parse in pedantic mode.
2000-07-08 11:49:29 +00:00
Bertho Stultiens 661a94033e - 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).
2000-06-13 03:37:56 +00:00
Bertho Stultiens c107f714d0 - 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.
2000-06-08 00:38:47 +00:00
Bertho Stultiens 997e0d782f - 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.
2000-05-23 01:18:38 +00:00
Bertho Stultiens 3d455c9b16 - 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.
- 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.
2000-05-09 22:35:10 +00:00
Bertho Stultiens 27337af65c - 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.
2000-05-01 20:05:58 +00:00
Patrik Stridvall 2fb8f9b61f Minor fix in wrc to support the Solaris preprocessor. 2000-03-28 19:25:46 +00:00
Francois Gouget 524bd76997 - An extern statement finishes with the first closing '}' or the first
outer ';'
- Handle '#error', '#line' and '#pragma' even when in the 'pp_strips',
  'pp_stripe', 'pp_stripp' or 'pp_false' contexts (just like '#if' and
  co).  But still don't issue an error if '#error' is found when in the
  'pp_false' state.
2000-03-19 12:44:46 +00:00