widl [1/6]: Generate names for tagless structs, unions and enums
Alexandre Julliard
julliard at winehq.org
Tue Aug 29 05:31:47 CDT 2006
Dan Hipschman <dsh at linux.ucla.edu> writes:
> +static char *gen_name(void)
> +{
> + static const char format[] = "__WIDL_%s_generated_name_%08lX";
> + static unsigned long n = 0;
> +
> + size_t size = sizeof format - 7 + strlen(input_base) + 8;
> + char *name = xmalloc(size);
> +
> + sprintf(name, format, input_base, n++);
> + return name;
> +}
You can't simply copy the file name, there's no guarantee it's a valid
C identifier. You should use something like make_c_identifier in
winebuild.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list