Commit 0bc218b9 authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

winmm: Prepare transition of MCI parser to 64bit.

parent 79b8de12
...@@ -1036,7 +1036,7 @@ static DWORD MCI_ParseOptArgs(DWORD_PTR* data, int _offset, LPCWSTR lpCmd, ...@@ -1036,7 +1036,7 @@ static DWORD MCI_ParseOptArgs(DWORD_PTR* data, int _offset, LPCWSTR lpCmd,
/* skip any leading white space(s) */ /* skip any leading white space(s) */
while (*args == ' ') args++; while (*args == ' ') args++;
TRACE("args=%s offset=%d\n", debugstr_w(args), offset); TRACE("args=%s\n", debugstr_w(args));
do { /* loop on options for command table for the requested verb */ do { /* loop on options for command table for the requested verb */
str = (LPCWSTR)lmem; str = (LPCWSTR)lmem;
...@@ -1056,6 +1056,11 @@ static DWORD MCI_ParseOptArgs(DWORD_PTR* data, int _offset, LPCWSTR lpCmd, ...@@ -1056,6 +1056,11 @@ static DWORD MCI_ParseOptArgs(DWORD_PTR* data, int _offset, LPCWSTR lpCmd,
} }
inCst = FALSE; cflg = 0; inCst = FALSE; cflg = 0;
break; break;
case MCI_RETURN:
if (offset != _offset) {
ERR("MCI_RETURN not in first position\n");
return MCIERR_PARSER_INTERNAL;
}
} }
if (strncmpiW(args, str, len) == 0 && if (strncmpiW(args, str, len) == 0 &&
...@@ -1075,17 +1080,20 @@ static DWORD MCI_ParseOptArgs(DWORD_PTR* data, int _offset, LPCWSTR lpCmd, ...@@ -1075,17 +1080,20 @@ static DWORD MCI_ParseOptArgs(DWORD_PTR* data, int _offset, LPCWSTR lpCmd,
break; break;
case MCI_FLAG: case MCI_FLAG:
*dwFlags |= flg; *dwFlags |= flg;
TRACE("flag=%08x\n", flg);
break; break;
case MCI_INTEGER: case MCI_INTEGER:
if (inCst) { if (inCst) {
data[offset] |= flg; data[offset] |= flg;
*dwFlags |= cflg; *dwFlags |= cflg;
inCst = FALSE; inCst = FALSE;
TRACE("flag=%08x constant=%08x\n", cflg, flg);
} else { } else {
*dwFlags |= flg; *dwFlags |= flg;
if (!MCI_GetDWord(&(data[offset]), &args)) { if (!MCI_GetDWord(&(data[offset]), &args)) {
return MCIERR_BAD_INTEGER; return MCIERR_BAD_INTEGER;
} }
TRACE("flag=%08x int=%ld\n", flg, data[offset]);
} }
break; break;
case MCI_RECT: case MCI_RECT:
...@@ -1098,11 +1106,13 @@ static DWORD MCI_ParseOptArgs(DWORD_PTR* data, int _offset, LPCWSTR lpCmd, ...@@ -1098,11 +1106,13 @@ static DWORD MCI_ParseOptArgs(DWORD_PTR* data, int _offset, LPCWSTR lpCmd,
ERR("Bad rect %s\n", debugstr_w(args)); ERR("Bad rect %s\n", debugstr_w(args));
return MCIERR_BAD_INTEGER; return MCIERR_BAD_INTEGER;
} }
TRACE("flag=%08x for rectangle\n", flg);
break; break;
case MCI_STRING: case MCI_STRING:
*dwFlags |= flg; *dwFlags |= flg;
if ((dwRet = MCI_GetString((LPWSTR*)&data[offset], &args))) if ((dwRet = MCI_GetString((LPWSTR*)&data[offset], &args)))
return dwRet; return dwRet;
TRACE("flag=%08x string=%s\n", flg, debugstr_w((LPWSTR)data[offset]));
break; break;
default: ERR("oops\n"); default: ERR("oops\n");
} }
...@@ -1401,11 +1411,10 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet, ...@@ -1401,11 +1411,10 @@ DWORD WINAPI mciSendStringW(LPCWSTR lpstrCommand, LPWSTR lpstrRet,
*/ */
if (lpstrRet && uRetLen) *lpstrRet = '\0'; if (lpstrRet && uRetLen) *lpstrRet = '\0';
TRACE("[%d, %s, %08x, %08lx/%s %08lx/%s %08lx/%s %08lx/%s %08lx/%s %08lx/%s]\n", TRACE("[%d, %s, %08x, %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx]\n",
wmd ? wmd->wDeviceID : uDevID, MCI_MessageToString(MCI_GetMessage(lpCmd)), dwFlags, wmd ? wmd->wDeviceID : uDevID, MCI_MessageToString(MCI_GetMessage(lpCmd)), dwFlags,
data[0], debugstr_w((WCHAR *)data[0]), data[1], debugstr_w((WCHAR *)data[1]), data[0], data[1], data[2], data[3], data[4],
data[2], debugstr_w((WCHAR *)data[2]), data[3], debugstr_w((WCHAR *)data[3]), data[5], data[6], data[7], data[8], data[9]);
data[4], debugstr_w((WCHAR *)data[4]), data[5], debugstr_w((WCHAR *)data[5]));
if (strcmpW(verb, wszOpen) == 0) { if (strcmpW(verb, wszOpen) == 0) {
if ((dwRet = MCI_FinishOpen(wmd, (LPMCI_OPEN_PARMSW)data, dwFlags))) if ((dwRet = MCI_FinishOpen(wmd, (LPMCI_OPEN_PARMSW)data, dwFlags)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment