Hello,

I'm trying to attack a "simple problem" in Wine: HIWORD() on a string isn't allowed. Only that the simple answer to "what is a string?" is in the Win32 API something like the monstrosity below (which isn't even complete):

@@
typedef CHAR, WCHAR;
typedef LPCH, LPSTR, NPSTR, PCH, PCHAR, PSTR;
typedef LPCCH, LPCSTR, PCCH, PCSTR;
typedef LPWCH, LPWSTR, NWPSTR, PWCH, PWCHAR, PWSTR;
typedef LPCWCH, LPCWSTR, PCWCH, PCWSTR;
\(char*\|CHAR*\|WCHAR*\| LPCH\|LPSTR\|NPSTR\|PCH\|PCHAR\|PSTR\| LPCCH\|LPCSTR\|PCCH\|PCHAR\|PCSTR\| LPWCH\|LPWSTR\|NWPSTR\|PWCH\|PWCHAR\|PWSTR\| LPCWCH\|LPCWSTR\|PCWCH\|PWCHAR\|PCWSTR\) x;
@@
- HIWORD(x)
+ !IS_INTRESOURCE(x)

This is parsed just fine by spatch but the warning:
  (ONCE) disjtype not supported in smpl type inference, assuming unknown
is given and the result is equivalent to having "type T; T x;".

Are there any plans to support this feature sometimes in the future? The types in the Win32 API are evil ...

Thanks
bye
        michael

_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to