wrc: Allow quotes in resource nameID.

Alexandre Julliard julliard at winehq.org
Wed Apr 12 02:55:43 CDT 2017


Artur Świgoń <artur.swigon at gmail.com> writes:

> @@ -138,6 +142,14 @@ static int wbufalloc = 0;
>  
>  static int current_codepage = -1;  /* use language default */
>  
> +/* Used for differentiating between single- and double-quoted nameID's */
> +static int id_dblquote = 0;
> +
> +/* Used for catching first (quoted) nameID before wanted_id is set.
> + * This variable is reset to 0 once the first ID (quoted or not), string or
> + * data has been encountered */
> +static int id_initial = 1;

That's a bit hackish. Couldn't you simply set the initial state
appropriately instead of introducing a separate variable?

> @@ -402,8 +414,30 @@ static unsigned long xstrtoul(const char *nptr, char **endptr, int base)
>  0[oO][0-7]+[lL]?	{ parser_lval.num = xstrtoul(yytext+2, 0, 8);
>                            return (yytext[yyleng-1] == 'L' || yytext[yyleng-1] == 'l') ? tLNUMBER : tNUMBER; }
>  
> +<tkid_dbl>[A-Za-z_0-9./\\\']+\" |
> +<tkid_sgl>[A-Za-z_0-9./\\\"]+\'	{

There are more characters that should be allowed. Nested quotes are also
supposed to work.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list