diff --git a/reactos/dll/win32/kernel32/client/misc/comm.c b/reactos/dll/win32/kernel32/client/misc/comm.c index f4dbd7e92a4..edb4b8753c4 100644 --- a/reactos/dll/win32/kernel32/client/misc/comm.c +++ b/reactos/dll/win32/kernel32/client/misc/comm.c @@ -1,27 +1,40 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/kernel32/misc/comm.c - * PURPOSE: Comm functions - * PROGRAMMER: Ariadne ( ariadne@xs4all.nl) - * modified from WINE [ Onno Hovers, (onno@stack.urc.tue.nl) ] - * Robert Dickenson (robd@mok.lvcom.com) - * Saveliy Tretiakov (saveliyt@mail.ru) - * Dmitry Philippov (shedon@mail.ru) - * UPDATE HISTORY: - * Created 01/11/98 - * RDD (30/09/2002) implemented many function bodies to call serial driver. - * KJK (11/02/2003) implemented BuildCommDCB & BuildCommDCBAndTimeouts - * ST (21/03/2005) implemented GetCommProperties - * ST (24/03/2005) implemented ClearCommError. Corrected many functions. - * ST (05/04/2005) implemented CommConfigDialog - * DP (11/06/2005) implemented GetCommConfig - * DP (12/06/2005) implemented SetCommConfig - * KJK (26/12/2008) reimplemented BuildCommDCB & BuildCommDCBAndTimeouts elsewhere + * DEC 93 Erik Bos * + * Copyright 1996 Marcus Meissner + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +//#include "config.h" +//#include "wine/port.h" + +#include +#include +#include + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winioctl.h" +#include "winternl.h" +//#include "ddk/ntddser.h" + +typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS; #undef SERIAL_LSRMST_ESCAPE #undef SERIAL_LSRMST_LSR_DATA #undef SERIAL_LSRMST_LSR_NODATA @@ -42,439 +55,1378 @@ #undef IOCTL_SERIAL_LSRMST_INSERT #include -#define NDEBUG -#include +#include "wine/unicode.h" -static const WCHAR lpszSerialUI[] = { - 's','e','r','i','a','l','u','i','.','d','l','l',0 }; +#include "wine/debug.h" -/* - * @implemented +WINE_DEFAULT_DEBUG_CHANNEL(comm); + +/*********************************************************************** + * COMM_Parse* (Internal) + * + * The following COMM_Parse* functions are used by the BuildCommDCB + * functions to help parse the various parts of the device control string. */ -BOOL -WINAPI -ClearCommBreak(HANDLE hFile) +static LPCWSTR COMM_ParseStart(LPCWSTR ptr) { - DWORD dwBytesReturned; - return DeviceIoControl(hFile, IOCTL_SERIAL_SET_BREAK_OFF, - NULL, 0, NULL, 0, &dwBytesReturned, NULL); -} + static const WCHAR comW[] = {'C','O','M',0}; - -/* - * @implemented - */ -BOOL -WINAPI -ClearCommError(HANDLE hFile, LPDWORD lpErrors, LPCOMSTAT lpComStat) -{ - BOOL status = FALSE; - DWORD dwBytesReturned; - SERIAL_STATUS SerialStatus; - - status = DeviceIoControl(hFile, IOCTL_SERIAL_GET_COMMSTATUS, NULL, 0, - &SerialStatus, sizeof(SERIAL_STATUS), &dwBytesReturned, NULL); - - if(!NT_SUCCESS(status)) - { - return status; - } - - if(lpErrors) - { - *lpErrors = 0; - if(SerialStatus.Errors & SERIAL_ERROR_BREAK) - *lpErrors |= CE_BREAK; - if(SerialStatus.Errors & SERIAL_ERROR_FRAMING) - *lpErrors |= CE_FRAME; - if(SerialStatus.Errors & SERIAL_ERROR_OVERRUN) - *lpErrors |= CE_OVERRUN; - if(SerialStatus.Errors & SERIAL_ERROR_QUEUEOVERRUN ) - *lpErrors |= CE_RXOVER; - if(SerialStatus.Errors & SERIAL_ERROR_PARITY) - *lpErrors |= CE_RXPARITY; - } - - if (lpComStat) - { - ZeroMemory(lpComStat, sizeof(COMSTAT)); - - if(SerialStatus.HoldReasons & SERIAL_TX_WAITING_FOR_CTS) - lpComStat->fCtsHold = TRUE; - if(SerialStatus.HoldReasons & SERIAL_TX_WAITING_FOR_DSR) - lpComStat->fDsrHold = TRUE; - if(SerialStatus.HoldReasons & SERIAL_TX_WAITING_FOR_DCD) - lpComStat->fRlsdHold = TRUE; - if(SerialStatus.HoldReasons & SERIAL_TX_WAITING_FOR_XON) - lpComStat->fXoffHold = TRUE; - if(SerialStatus.HoldReasons & SERIAL_TX_WAITING_XOFF_SENT) - lpComStat->fXoffSent = TRUE; - - if(SerialStatus.EofReceived) - lpComStat->fEof = TRUE; - - if(SerialStatus.WaitForImmediate) - lpComStat->fTxim = TRUE; - - lpComStat->cbInQue = SerialStatus.AmountInInQueue; - lpComStat->cbOutQue = SerialStatus.AmountInOutQueue; - } - return TRUE; -} - - -/* - * @implemented - */ -BOOL -WINAPI -CommConfigDialogA(LPCSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC) -{ - PWCHAR NameW; - DWORD result; - - /* don't use the static thread buffer so operations in serialui - don't overwrite the string */ - if(!(NameW = FilenameA2W(lpszName, TRUE))) + /* The device control string may optionally start with "COMx" followed + by an optional ':' and spaces. */ + if(!strncmpiW(ptr, comW, 3)) { - return FALSE; + ptr += 3; + + /* Allow any com port above 0 as Win 9x does (NT only allows + values for com ports which are actually present) */ + if(*ptr < '1' || *ptr > '9') + return NULL; + + /* Advance pointer past port number */ + while(*ptr >= '0' && *ptr <= '9') ptr++; + + /* The com port number must be followed by a ':' or ' ' */ + if(*ptr != ':' && *ptr != ' ') + return NULL; + + /* Advance pointer to beginning of next parameter */ + while(*ptr == ' ') ptr++; + if(*ptr == ':') + { + ptr++; + while(*ptr == ' ') ptr++; + } } - - result = CommConfigDialogW(NameW, hWnd, lpCC); - - RtlFreeHeap(RtlGetProcessHeap(), 0, NameW); - - return result; + /* The device control string must not start with a space. */ + else if(*ptr == ' ') + return NULL; + + return ptr; +} + +static LPCWSTR COMM_ParseNumber(LPCWSTR ptr, LPDWORD lpnumber) +{ + if(*ptr < '0' || *ptr > '9') return NULL; + *lpnumber = strtoulW(ptr, NULL, 10); + while(*ptr >= '0' && *ptr <= '9') ptr++; + return ptr; } - -/* - * @implemented - */ -BOOL -WINAPI -CommConfigDialogW(LPCWSTR lpszName, HWND hWnd, LPCOMMCONFIG lpCC) +static LPCWSTR COMM_ParseParity(LPCWSTR ptr, LPBYTE lpparity) { - DWORD (WINAPI *drvCommDlgW)(LPCWSTR, HWND, LPCOMMCONFIG); - HMODULE hSerialuiDll; - DWORD result; + /* Contrary to what you might expect, Windows only sets the Parity + member of DCB and not fParity even when parity is specified in the + device control string */ - //FIXME: Get dll name from registry. (setupapi needed) - if(!(hSerialuiDll = LoadLibraryW(L"serialui.dll"))) + switch(toupperW(*ptr++)) { - DPRINT("CommConfigDialogW: serialui.dll not found.\n"); - return FALSE; - } - - drvCommDlgW = (DWORD (WINAPI *)(LPCWSTR, HWND, LPCOMMCONFIG)) - GetProcAddress(hSerialuiDll, "drvCommConfigDialogW"); - - if(!drvCommDlgW) - { - DPRINT("CommConfigDialogW: serialui does not export drvCommConfigDialogW\n"); - FreeLibrary(hSerialuiDll); - return FALSE; - } - - result = drvCommDlgW(lpszName, hWnd, lpCC); - SetLastError(result); - FreeLibrary(hSerialuiDll); - - return (result == ERROR_SUCCESS ? TRUE : FALSE); -} - - -/* - * @implemented - */ -BOOL -WINAPI -EscapeCommFunction(HANDLE hFile, DWORD dwFunc) -{ - BOOL result = FALSE; - DWORD dwBytesReturned; - - switch (dwFunc) { - case CLRDTR: // Clears the DTR (data-terminal-ready) signal. - result = DeviceIoControl(hFile, IOCTL_SERIAL_CLR_DTR, NULL, 0, NULL, 0, &dwBytesReturned, NULL); + case 'E': + *lpparity = EVENPARITY; break; - case CLRRTS: // Clears the RTS (request-to-send) signal. - result = DeviceIoControl(hFile, IOCTL_SERIAL_CLR_RTS, NULL, 0, NULL, 0, &dwBytesReturned, NULL); + case 'M': + *lpparity = MARKPARITY; break; - case SETDTR: // Sends the DTR (data-terminal-ready) signal. - result = DeviceIoControl(hFile, IOCTL_SERIAL_SET_DTR, NULL, 0, NULL, 0, &dwBytesReturned, NULL); + case 'N': + *lpparity = NOPARITY; break; - case SETRTS: // Sends the RTS (request-to-send) signal. - result = DeviceIoControl(hFile, IOCTL_SERIAL_SET_RTS, NULL, 0, NULL, 0, &dwBytesReturned, NULL); + case 'O': + *lpparity = ODDPARITY; break; - case SETXOFF: // Causes transmission to act as if an XOFF character has been received. - result = DeviceIoControl(hFile, IOCTL_SERIAL_SET_XOFF, NULL, 0, NULL, 0, &dwBytesReturned, NULL); - break; - case SETXON: // Causes transmission to act as if an XON character has been received. - result = DeviceIoControl(hFile, IOCTL_SERIAL_SET_XON, NULL, 0, NULL, 0, &dwBytesReturned, NULL); - break; - case SETBREAK: // Suspends character transmission and places the transmission line in a break state until the ClearCommBreak function is called (or EscapeCommFunction is called with the CLRBREAK extended function code). The SETBREAK extended function code is identical to the SetCommBreak function. Note that this extended function does not flush data that has not been transmitted. - result = DeviceIoControl(hFile, IOCTL_SERIAL_SET_BREAK_ON, NULL, 0, NULL, 0, &dwBytesReturned, NULL); - break; - case CLRBREAK: // Restores character transmission and places the transmission line in a nonbreak state. The CLRBREAK extended function code is identical to the ClearCommBreak function. - result = DeviceIoControl(hFile, IOCTL_SERIAL_SET_BREAK_OFF, NULL, 0, NULL, 0, &dwBytesReturned, NULL); + case 'S': + *lpparity = SPACEPARITY; break; default: - DPRINT("EscapeCommFunction() WARNING: unknown function code\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - break; + return NULL; } - return result; + + return ptr; } - -/* - * @implemented - */ -BOOL -WINAPI -GetCommConfig(HANDLE hCommDev, LPCOMMCONFIG lpCC, LPDWORD lpdwSize) +static LPCWSTR COMM_ParseByteSize(LPCWSTR ptr, LPBYTE lpbytesize) { - BOOL ReturnValue = FALSE; - LPCOMMPROP lpComPort; + DWORD temp; - DPRINT("GetCommConfig(%d, %p, %p)\n", hCommDev, lpCC, lpdwSize); + if(!(ptr = COMM_ParseNumber(ptr, &temp))) + return NULL; - lpComPort = RtlAllocateHeap( hProcessHeap, - HEAP_ZERO_MEMORY, - sizeof(COMMPROP) + 0x100 ); - - if(NULL == lpComPort) { - DPRINT("GetCommConfig() - ERROR_NOT_ENOUGH_MEMORY\n"); - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; + if(temp >= 5 && temp <= 8) + { + *lpbytesize = temp; + return ptr; } + else + return NULL; +} - if( (NULL == lpdwSize) - || (NULL == lpCC) ) { - DPRINT("GetCommConfig() - invalid parameter\n"); - SetLastError(ERROR_INVALID_PARAMETER); - ReturnValue = FALSE; +static LPCWSTR COMM_ParseStopBits(LPCWSTR ptr, LPBYTE lpstopbits) +{ + DWORD temp; + static const WCHAR stopbits15W[] = {'1','.','5',0}; + + if(!strncmpW(stopbits15W, ptr, 3)) + { + ptr += 3; + *lpstopbits = ONE5STOPBITS; } else { - lpComPort->wPacketLength = sizeof(COMMPROP) + 0x100; - lpComPort->dwProvSpec1 = COMMPROP_INITIALIZED; - ReturnValue = GetCommProperties(hCommDev, lpComPort); - if( ReturnValue ) - { - lpCC->dwSize = sizeof(COMMCONFIG); - lpCC->wVersion = 1; - lpCC->wReserved = 0; - lpCC->dwProviderSubType = lpComPort->dwProvSubType; - lpCC->dwProviderSize = lpComPort->dwProvSpec2; - if( 0 == lpComPort->dwProvSpec2 ) { - lpCC->dwProviderOffset = 0; - } else { - lpCC->dwProviderOffset = (ULONG_PTR)&lpCC->wcProviderData[0] - (ULONG_PTR)lpCC; - } - if( (lpCC->dwProviderSize+lpCC->dwSize) > *lpdwSize ) { - DPRINT("GetCommConfig() - ERROR_INSUFFICIENT_BUFFER\n"); - SetLastError(ERROR_INSUFFICIENT_BUFFER); - ReturnValue = FALSE; - } else { - RtlCopyMemory(lpCC->wcProviderData, lpComPort->wcProvChar, lpCC->dwProviderSize); - ReturnValue = GetCommState(hCommDev, &lpCC->dcb); - } - *lpdwSize = lpCC->dwSize+lpCC->dwProviderSize; - } + if(!(ptr = COMM_ParseNumber(ptr, &temp))) + return NULL; + + if(temp == 1) + *lpstopbits = ONESTOPBIT; + else if(temp == 2) + *lpstopbits = TWOSTOPBITS; + else + return NULL; + } + + return ptr; +} + +static LPCWSTR COMM_ParseOnOff(LPCWSTR ptr, LPDWORD lponoff) +{ + static const WCHAR onW[] = {'o','n',0}; + static const WCHAR offW[] = {'o','f','f',0}; + + if(!strncmpiW(onW, ptr, 2)) + { + ptr += 2; + *lponoff = 1; + } + else if(!strncmpiW(offW, ptr, 3)) + { + ptr += 3; + *lponoff = 0; + } + else + return NULL; + + return ptr; +} + +/*********************************************************************** + * COMM_BuildOldCommDCB (Internal) + * + * Build a DCB using the old style settings string eg: "96,n,8,1" + */ +static BOOL COMM_BuildOldCommDCB(LPCWSTR device, LPDCB lpdcb) +{ + WCHAR last = 0; + + if(!(device = COMM_ParseNumber(device, &lpdcb->BaudRate))) + return FALSE; + + switch(lpdcb->BaudRate) + { + case 11: + case 30: + case 60: + lpdcb->BaudRate *= 10; + break; + case 12: + case 24: + case 48: + case 96: + lpdcb->BaudRate *= 100; + break; + case 19: + lpdcb->BaudRate = 19200; + break; } - RtlFreeHeap(hProcessHeap, 0, lpComPort); - return (ReturnValue); -} + while(*device == ' ') device++; + if(*device++ != ',') return FALSE; + while(*device == ' ') device++; + if(!(device = COMM_ParseParity(device, &lpdcb->Parity))) + return FALSE; -/* - * @implemented - */ -BOOL -WINAPI -GetCommMask(HANDLE hFile, LPDWORD lpEvtMask) -{ - DWORD dwBytesReturned; - return DeviceIoControl(hFile, IOCTL_SERIAL_GET_WAIT_MASK, - NULL, 0, lpEvtMask, sizeof(DWORD), &dwBytesReturned, NULL); -} + while(*device == ' ') device++; + if(*device++ != ',') return FALSE; + while(*device == ' ') device++; + + if(!(device = COMM_ParseByteSize(device, &lpdcb->ByteSize))) + return FALSE; + while(*device == ' ') device++; + if(*device++ != ',') return FALSE; + while(*device == ' ') device++; -/* - * @implemented - */ -BOOL -WINAPI -GetCommModemStatus(HANDLE hFile, LPDWORD lpModemStat) -{ - DWORD dwBytesReturned; + if(!(device = COMM_ParseStopBits(device, &lpdcb->StopBits))) + return FALSE; - return DeviceIoControl(hFile, IOCTL_SERIAL_GET_MODEMSTATUS, - NULL, 0, lpModemStat, sizeof(DWORD), &dwBytesReturned, NULL); -} + /* The last parameter for flow control is optional. */ + while(*device == ' ') device++; + if(*device == ',') + { + device++; + while(*device == ' ') device++; + if(*device) last = toupperW(*device++); + while(*device == ' ') device++; + } - -/* - * @implemented - */ -BOOL -WINAPI -GetCommProperties(HANDLE hFile, LPCOMMPROP lpCommProp) -{ - DWORD dwBytesReturned; - return DeviceIoControl(hFile, IOCTL_SERIAL_GET_PROPERTIES, 0, 0, - lpCommProp, sizeof(COMMPROP), &dwBytesReturned, 0); -} - - -/* - * @implemented - */ -BOOL -WINAPI -GetCommState(HANDLE hFile, LPDCB lpDCB) -{ - BOOL result = FALSE; - DWORD dwBytesReturned; - - SERIAL_BAUD_RATE BaudRate; - SERIAL_HANDFLOW HandFlow; - SERIAL_CHARS SpecialChars; - SERIAL_LINE_CONTROL LineControl; - - DPRINT("GetCommState(%d, %p)\n", hFile, lpDCB); - - if (lpDCB == NULL) { - SetLastError(ERROR_INVALID_PARAMETER); - DPRINT("ERROR: GetCommState() - NULL DCB pointer\n"); + /* Win NT sets the flow control members based on (or lack of) the last + parameter. Win 9x does not set these members. */ + switch(last) + { + case 0: + lpdcb->fInX = FALSE; + lpdcb->fOutX = FALSE; + lpdcb->fOutxCtsFlow = FALSE; + lpdcb->fOutxDsrFlow = FALSE; + lpdcb->fDtrControl = DTR_CONTROL_ENABLE; + lpdcb->fRtsControl = RTS_CONTROL_ENABLE; + break; + case 'X': + lpdcb->fInX = TRUE; + lpdcb->fOutX = TRUE; + lpdcb->fOutxCtsFlow = FALSE; + lpdcb->fOutxDsrFlow = FALSE; + lpdcb->fDtrControl = DTR_CONTROL_ENABLE; + lpdcb->fRtsControl = RTS_CONTROL_ENABLE; + break; + case 'P': + lpdcb->fInX = FALSE; + lpdcb->fOutX = FALSE; + lpdcb->fOutxCtsFlow = TRUE; + lpdcb->fOutxDsrFlow = TRUE; + lpdcb->fDtrControl = DTR_CONTROL_HANDSHAKE; + lpdcb->fRtsControl = RTS_CONTROL_HANDSHAKE; + break; + default: return FALSE; } - if (!DeviceIoControl(hFile, IOCTL_SERIAL_GET_BAUD_RATE, - NULL, 0, &BaudRate, sizeof(BaudRate), &dwBytesReturned, NULL) || - !DeviceIoControl(hFile, IOCTL_SERIAL_GET_LINE_CONTROL, - NULL, 0, &LineControl, sizeof(LineControl), &dwBytesReturned, NULL) || - !DeviceIoControl(hFile, IOCTL_SERIAL_GET_HANDFLOW, - NULL, 0, &HandFlow, sizeof(HandFlow), &dwBytesReturned, NULL) || - !DeviceIoControl(hFile, IOCTL_SERIAL_GET_CHARS, - NULL, 0, &SpecialChars, sizeof(SpecialChars), &dwBytesReturned, NULL)) - return FALSE; - - memset(lpDCB, 0, sizeof(*lpDCB)); - lpDCB->DCBlength = sizeof(*lpDCB); - - lpDCB->fBinary = 1; - lpDCB->fParity = 0; - lpDCB->BaudRate = BaudRate.BaudRate; - - lpDCB->StopBits = LineControl.StopBits; - lpDCB->Parity = LineControl.Parity; - lpDCB->ByteSize = LineControl.WordLength; - - if (HandFlow.ControlHandShake & SERIAL_CTS_HANDSHAKE) { - lpDCB->fOutxCtsFlow = 1; - } - if (HandFlow.ControlHandShake & SERIAL_DSR_HANDSHAKE) { - lpDCB->fOutxDsrFlow = 1; - } - if (HandFlow.ControlHandShake & SERIAL_DTR_CONTROL) { - lpDCB->fDtrControl = 1; - } - if (HandFlow.ControlHandShake & SERIAL_DTR_HANDSHAKE) { - lpDCB->fDtrControl = 2; - } - if (HandFlow.ControlHandShake & SERIAL_RTS_CONTROL) { - lpDCB->fRtsControl = 1; - } - if (HandFlow.ControlHandShake & SERIAL_RTS_HANDSHAKE) { - lpDCB->fRtsControl = 2; - } - if (HandFlow.ControlHandShake & SERIAL_DSR_SENSITIVITY) { - lpDCB->fDsrSensitivity = 1; - } - if (HandFlow.ControlHandShake & SERIAL_ERROR_ABORT) { - lpDCB->fAbortOnError = 1; - } - - if (HandFlow.FlowReplace & SERIAL_ERROR_CHAR) { - lpDCB->fErrorChar = 1; - } - if (HandFlow.FlowReplace & SERIAL_NULL_STRIPPING) { - lpDCB->fNull = 1; - } - if (HandFlow.FlowReplace & SERIAL_XOFF_CONTINUE) { - lpDCB->fTXContinueOnXoff = 1; - } - lpDCB->XonLim = (WORD)HandFlow.XonLimit; - lpDCB->XoffLim = (WORD)HandFlow.XoffLimit; - - result = DeviceIoControl(hFile, IOCTL_SERIAL_GET_CHARS, - NULL, 0, &SpecialChars, sizeof(SpecialChars), &dwBytesReturned, NULL); - if (!NT_SUCCESS(result)) { - DPRINT("ERROR: GetCommState() - DeviceIoControl(IOCTL_SERIAL_GET_CHARS) Failed.\n"); - return FALSE; - } - - lpDCB->EofChar = SpecialChars.EofChar; - lpDCB->ErrorChar = SpecialChars.ErrorChar; - // = SpecialChars.BreakChar; - lpDCB->EvtChar = SpecialChars.EventChar; - lpDCB->XonChar = SpecialChars.XonChar; - lpDCB->XoffChar = SpecialChars.XoffChar; - - result = DeviceIoControl(hFile, IOCTL_SERIAL_GET_LINE_CONTROL, - NULL, 0, &LineControl, sizeof(LineControl), &dwBytesReturned, NULL); - if (!NT_SUCCESS(result)) { - DPRINT("ERROR: GetCommState() - DeviceIoControl(IOCTL_SERIAL_GET_LINE_CONTROL) Failed.\n"); - return FALSE; - } - lpDCB->StopBits = LineControl.StopBits; - lpDCB->Parity = LineControl.Parity; - lpDCB->ByteSize = LineControl.WordLength; - DPRINT("GetCommState() - COMPLETED SUCCESSFULLY\n"); + /* This should be the end of the string. */ + if(*device) return FALSE; + return TRUE; } - -/* - * @implemented +/*********************************************************************** + * COMM_BuildNewCommDCB (Internal) + * + * Build a DCB using the new style settings string. + * eg: "baud=9600 parity=n data=8 stop=1 xon=on to=on" */ -BOOL -WINAPI -GetCommTimeouts(HANDLE hFile, LPCOMMTIMEOUTS lpCommTimeouts) +static BOOL COMM_BuildNewCommDCB(LPCWSTR device, LPDCB lpdcb, LPCOMMTIMEOUTS lptimeouts) { - DWORD dwBytesReturned; + DWORD temp; + BOOL baud = FALSE, stop = FALSE; + static const WCHAR baudW[] = {'b','a','u','d','=',0}; + static const WCHAR parityW[] = {'p','a','r','i','t','y','=',0}; + static const WCHAR dataW[] = {'d','a','t','a','=',0}; + static const WCHAR stopW[] = {'s','t','o','p','=',0}; + static const WCHAR toW[] = {'t','o','=',0}; + static const WCHAR xonW[] = {'x','o','n','=',0}; + static const WCHAR odsrW[] = {'o','d','s','r','=',0}; + static const WCHAR octsW[] = {'o','c','t','s','=',0}; + static const WCHAR dtrW[] = {'d','t','r','=',0}; + static const WCHAR rtsW[] = {'r','t','s','=',0}; + static const WCHAR idsrW[] = {'i','d','s','r','=',0}; - if (lpCommTimeouts == NULL) { - return FALSE; + while(*device) + { + while(*device == ' ') device++; + + if(!strncmpiW(baudW, device, 5)) + { + baud = TRUE; + + if(!(device = COMM_ParseNumber(device + 5, &lpdcb->BaudRate))) + return FALSE; + } + else if(!strncmpiW(parityW, device, 7)) + { + if(!(device = COMM_ParseParity(device + 7, &lpdcb->Parity))) + return FALSE; + } + else if(!strncmpiW(dataW, device, 5)) + { + if(!(device = COMM_ParseByteSize(device + 5, &lpdcb->ByteSize))) + return FALSE; + } + else if(!strncmpiW(stopW, device, 5)) + { + stop = TRUE; + + if(!(device = COMM_ParseStopBits(device + 5, &lpdcb->StopBits))) + return FALSE; + } + else if(!strncmpiW(toW, device, 3)) + { + if(!(device = COMM_ParseOnOff(device + 3, &temp))) + return FALSE; + + lptimeouts->ReadIntervalTimeout = 0; + lptimeouts->ReadTotalTimeoutMultiplier = 0; + lptimeouts->ReadTotalTimeoutConstant = 0; + lptimeouts->WriteTotalTimeoutMultiplier = 0; + lptimeouts->WriteTotalTimeoutConstant = temp ? 60000 : 0; + } + else if(!strncmpiW(xonW, device, 4)) + { + if(!(device = COMM_ParseOnOff(device + 4, &temp))) + return FALSE; + + lpdcb->fOutX = temp; + lpdcb->fInX = temp; + } + else if(!strncmpiW(odsrW, device, 5)) + { + if(!(device = COMM_ParseOnOff(device + 5, &temp))) + return FALSE; + + lpdcb->fOutxDsrFlow = temp; + } + else if(!strncmpiW(octsW, device, 5)) + { + if(!(device = COMM_ParseOnOff(device + 5, &temp))) + return FALSE; + + lpdcb->fOutxCtsFlow = temp; + } + else if(!strncmpiW(dtrW, device, 4)) + { + if(!(device = COMM_ParseOnOff(device + 4, &temp))) + return FALSE; + + lpdcb->fDtrControl = temp; + } + else if(!strncmpiW(rtsW, device, 4)) + { + if(!(device = COMM_ParseOnOff(device + 4, &temp))) + return FALSE; + + lpdcb->fRtsControl = temp; + } + else if(!strncmpiW(idsrW, device, 5)) + { + if(!(device = COMM_ParseOnOff(device + 5, &temp))) + return FALSE; + + /* Win NT sets the fDsrSensitivity member based on the + idsr parameter. Win 9x sets fOutxDsrFlow instead. */ + lpdcb->fDsrSensitivity = temp; + } + else + return FALSE; + + /* After the above parsing, the next character (if not the end of + the string) should be a space */ + if(*device && *device != ' ') + return FALSE; } - return DeviceIoControl(hFile, IOCTL_SERIAL_GET_TIMEOUTS, - NULL, 0, - lpCommTimeouts, sizeof(COMMTIMEOUTS), - &dwBytesReturned, NULL); + /* If stop bits were not specified, a default is always supplied. */ + if(!stop) + { + if(baud && lpdcb->BaudRate == 110) + lpdcb->StopBits = TWOSTOPBITS; + else + lpdcb->StopBits = ONESTOPBIT; + } + + return TRUE; +} + +/************************************************************************** + * BuildCommDCBA (KERNEL32.@) + * + * Updates a device control block data structure with values from an + * ascii device control string. The device control string has two forms + * normal and extended, it must be exclusively in one or the other form. + * + * RETURNS + * + * True on success, false on a malformed control string. + */ +BOOL WINAPI BuildCommDCBA( + LPCSTR device, /* [in] The ascii device control string used to update the DCB. */ + LPDCB lpdcb) /* [out] The device control block to be updated. */ +{ + return BuildCommDCBAndTimeoutsA(device,lpdcb,NULL); +} + +/************************************************************************** + * BuildCommDCBAndTimeoutsA (KERNEL32.@) + * + * Updates a device control block data structure with values from an + * ascii device control string. Taking timeout values from a timeouts + * struct if desired by the control string. + * + * RETURNS + * + * True on success, false bad handles etc. + */ +BOOL WINAPI BuildCommDCBAndTimeoutsA( + LPCSTR device, /* [in] The ascii device control string. */ + LPDCB lpdcb, /* [out] The device control block to be updated. */ + LPCOMMTIMEOUTS lptimeouts) /* [in] The COMMTIMEOUTS structure to be updated. */ +{ + BOOL ret = FALSE; + UNICODE_STRING deviceW; + + TRACE("(%s,%p,%p)\n",device,lpdcb,lptimeouts); + if(device) RtlCreateUnicodeStringFromAsciiz(&deviceW,device); + else deviceW.Buffer = NULL; + + if(deviceW.Buffer) ret = BuildCommDCBAndTimeoutsW(deviceW.Buffer,lpdcb,lptimeouts); + + RtlFreeUnicodeString(&deviceW); + return ret; +} + +/************************************************************************** + * BuildCommDCBAndTimeoutsW (KERNEL32.@) + * + * Updates a device control block data structure with values from a + * unicode device control string. Taking timeout values from a timeouts + * struct if desired by the control string. + * + * RETURNS + * + * True on success, false bad handles etc + */ +BOOL WINAPI BuildCommDCBAndTimeoutsW( + LPCWSTR devid, /* [in] The unicode device control string. */ + LPDCB lpdcb, /* [out] The device control block to be updated. */ + LPCOMMTIMEOUTS lptimeouts) /* [in] The COMMTIMEOUTS structure to be updated. */ +{ + DCB dcb; + COMMTIMEOUTS timeouts; + BOOL result; + LPCWSTR ptr = devid; + + TRACE("(%s,%p,%p)\n",debugstr_w(devid),lpdcb,lptimeouts); + + memset(&timeouts, 0, sizeof timeouts); + + /* Set DCBlength. (Windows NT does not do this, but 9x does) */ + lpdcb->DCBlength = sizeof(DCB); + + /* Make a copy of the original data structures to work with since if + if there is an error in the device control string the originals + should not be modified (except possibly DCBlength) */ + dcb = *lpdcb; + if(lptimeouts) timeouts = *lptimeouts; + + ptr = COMM_ParseStart(ptr); + + if(ptr == NULL) + result = FALSE; + else if(strchrW(ptr, ',')) + result = COMM_BuildOldCommDCB(ptr, &dcb); + else + result = COMM_BuildNewCommDCB(ptr, &dcb, &timeouts); + + if(result) + { + *lpdcb = dcb; + if(lptimeouts) *lptimeouts = timeouts; + return TRUE; + } + else + { + WARN("Invalid device control string: %s\n", debugstr_w(devid)); + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } +} + +/************************************************************************** + * BuildCommDCBW (KERNEL32.@) + * + * Updates a device control block structure with values from an + * unicode device control string. The device control string has two forms + * normal and extended, it must be exclusively in one or the other form. + * + * RETURNS + * + * True on success, false on a malformed control string. + */ +BOOL WINAPI BuildCommDCBW( + LPCWSTR devid, /* [in] The unicode device control string. */ + LPDCB lpdcb) /* [out] The device control block to be updated. */ +{ + return BuildCommDCBAndTimeoutsW(devid,lpdcb,NULL); +} + +/***************************************************************************** + * SetCommBreak (KERNEL32.@) + * + * Halts the transmission of characters to a communications device. + * + * PARAMS + * handle [in] The communications device to suspend + * + * RETURNS + * + * True on success, and false if the communications device could not be found, + * the control is not supported. + * + * BUGS + * + * Only TIOCSBRK and TIOCCBRK are supported. + */ +BOOL WINAPI SetCommBreak(HANDLE handle) +{ + DWORD dwBytesReturned; + return DeviceIoControl(handle, IOCTL_SERIAL_SET_BREAK_ON, NULL, 0, NULL, 0, &dwBytesReturned, NULL); +} + +/***************************************************************************** + * ClearCommBreak (KERNEL32.@) + * + * Resumes character transmission from a communication device. + * + * PARAMS + * + * handle [in] The halted communication device whose character transmission is to be resumed + * + * RETURNS + * + * True on success and false if the communications device could not be found. + * + * BUGS + * + * Only TIOCSBRK and TIOCCBRK are supported. + */ +BOOL WINAPI ClearCommBreak(HANDLE handle) +{ + DWORD dwBytesReturned; + return DeviceIoControl(handle, IOCTL_SERIAL_SET_BREAK_OFF, NULL, 0, NULL, 0, &dwBytesReturned, NULL); +} + +/***************************************************************************** + * EscapeCommFunction (KERNEL32.@) + * + * Directs a communication device to perform an extended function. + * + * PARAMS + * + * handle [in] The communication device to perform the extended function + * nFunction [in] The extended function to be performed + * + * RETURNS + * + * True or requested data on successful completion of the command, + * false if the device is not present cannot execute the command + * or the command failed. + */ +BOOL WINAPI EscapeCommFunction(HANDLE handle, DWORD func) +{ + DWORD ioc; + DWORD dwBytesReturned; + + switch (func) + { + case CLRDTR: ioc = IOCTL_SERIAL_CLR_DTR; break; + case CLRRTS: ioc = IOCTL_SERIAL_CLR_RTS; break; + case SETDTR: ioc = IOCTL_SERIAL_SET_DTR; break; + case SETRTS: ioc = IOCTL_SERIAL_SET_RTS; break; + case SETXOFF: ioc = IOCTL_SERIAL_SET_XOFF; break; + case SETXON: ioc = IOCTL_SERIAL_SET_XON; break; + case SETBREAK: ioc = IOCTL_SERIAL_SET_BREAK_ON; break; + case CLRBREAK: ioc = IOCTL_SERIAL_SET_BREAK_OFF; break; + case RESETDEV: ioc = IOCTL_SERIAL_RESET_DEVICE; break; + default: + ERR("Unknown function code (%u)\n", func); + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + return DeviceIoControl(handle, ioc, NULL, 0, NULL, 0, &dwBytesReturned, NULL); +} + +/******************************************************************** + * PurgeComm (KERNEL32.@) + * + * Terminates pending operations and/or discards buffers on a + * communication resource. + * + * PARAMS + * + * handle [in] The communication resource to be purged + * flags [in] Flags for clear pending/buffer on input/output + * + * RETURNS + * + * True on success and false if the communications handle is bad. + */ +BOOL WINAPI PurgeComm(HANDLE handle, DWORD flags) +{ + DWORD dwBytesReturned; + return DeviceIoControl(handle, IOCTL_SERIAL_PURGE, &flags, sizeof(flags), + NULL, 0, &dwBytesReturned, NULL); +} + +/***************************************************************************** + * ClearCommError (KERNEL32.@) + * + * Enables further I/O operations on a communications resource after + * supplying error and current status information. + * + * PARAMS + * + * handle [in] The communication resource with the error + * errors [out] Flags indicating error the resource experienced + * lpStat [out] The status of the communication resource + * RETURNS + * + * True on success, false if the communication resource handle is bad. + */ +BOOL WINAPI ClearCommError(HANDLE handle, LPDWORD errors, LPCOMSTAT lpStat) +{ + SERIAL_STATUS ss; + DWORD dwBytesReturned; + + if (!DeviceIoControl(handle, IOCTL_SERIAL_GET_COMMSTATUS, NULL, 0, + &ss, sizeof(ss), &dwBytesReturned, NULL)) + return FALSE; + + if (errors) + { + *errors = 0; + if (ss.Errors & SERIAL_ERROR_BREAK) *errors |= CE_BREAK; + if (ss.Errors & SERIAL_ERROR_FRAMING) *errors |= CE_FRAME; + if (ss.Errors & SERIAL_ERROR_OVERRUN) *errors |= CE_OVERRUN; + if (ss.Errors & SERIAL_ERROR_QUEUEOVERRUN) *errors |= CE_RXOVER; + if (ss.Errors & SERIAL_ERROR_PARITY) *errors |= CE_RXPARITY; + } + + if (lpStat) + { + memset(lpStat, 0, sizeof(*lpStat)); + + if (ss.HoldReasons & SERIAL_TX_WAITING_FOR_CTS) lpStat->fCtsHold = TRUE; + if (ss.HoldReasons & SERIAL_TX_WAITING_FOR_DSR) lpStat->fDsrHold = TRUE; + if (ss.HoldReasons & SERIAL_TX_WAITING_FOR_DCD) lpStat->fRlsdHold = TRUE; + if (ss.HoldReasons & SERIAL_TX_WAITING_FOR_XON) lpStat->fXoffHold = TRUE; + if (ss.HoldReasons & SERIAL_TX_WAITING_XOFF_SENT) lpStat->fXoffSent = TRUE; + if (ss.EofReceived) lpStat->fEof = TRUE; + if (ss.WaitForImmediate) lpStat->fTxim = TRUE; + lpStat->cbInQue = ss.AmountInInQueue; + lpStat->cbOutQue = ss.AmountInOutQueue; + } + return TRUE; +} + +/***************************************************************************** + * SetupComm (KERNEL32.@) + * + * Called after CreateFile to hint to the communication resource to use + * specified sizes for input and output buffers rather than the default values. + * + * PARAMS + * handle [in] The just created communication resource handle + * insize [in] The suggested size of the communication resources input buffer in bytes + * outsize [in] The suggested size of the communication resources output buffer in bytes + * + * RETURNS + * + * True if successful, false if the communications resource handle is bad. + * + * BUGS + * + * Stub. + */ +BOOL WINAPI SetupComm(HANDLE handle, DWORD insize, DWORD outsize) +{ + SERIAL_QUEUE_SIZE sqs; + DWORD dwBytesReturned; + + sqs.InSize = insize; + sqs.OutSize = outsize; + return DeviceIoControl(handle, IOCTL_SERIAL_SET_QUEUE_SIZE, + &sqs, sizeof(sqs), NULL, 0, &dwBytesReturned, NULL); +} + +/***************************************************************************** + * GetCommMask (KERNEL32.@) + * + * Obtain the events associated with a communication device that will cause + * a call WaitCommEvent to return. + * + * PARAMS + * + * handle [in] The communications device + * evtmask [out] The events which cause WaitCommEvent to return + * + * RETURNS + * + * True on success, fail on bad device handle etc. + */ +BOOL WINAPI GetCommMask(HANDLE handle, LPDWORD evtmask) +{ + DWORD dwBytesReturned; + TRACE("handle %p, mask %p\n", handle, evtmask); + return DeviceIoControl(handle, IOCTL_SERIAL_GET_WAIT_MASK, + NULL, 0, evtmask, sizeof(*evtmask), &dwBytesReturned, NULL); +} + +/***************************************************************************** + * SetCommMask (KERNEL32.@) + * + * There be some things we need to hear about yon there communications device. + * (Set which events associated with a communication device should cause + * a call WaitCommEvent to return.) + * + * PARAMS + * + * handle [in] The communications device + * evtmask [in] The events that are to be monitored + * + * RETURNS + * + * True on success, false on bad handle etc. + */ +BOOL WINAPI SetCommMask(HANDLE handle, DWORD evtmask) +{ + DWORD dwBytesReturned; + TRACE("handle %p, mask %x\n", handle, evtmask); + return DeviceIoControl(handle, IOCTL_SERIAL_SET_WAIT_MASK, + &evtmask, sizeof(evtmask), NULL, 0, &dwBytesReturned, NULL); +} + +static void dump_dcb(const DCB* lpdcb) +{ + TRACE("bytesize=%d baudrate=%d fParity=%d Parity=%d stopbits=%d\n", + lpdcb->ByteSize, lpdcb->BaudRate, lpdcb->fParity, lpdcb->Parity, + (lpdcb->StopBits == ONESTOPBIT) ? 1 : + (lpdcb->StopBits == TWOSTOPBITS) ? 2 : 0); + TRACE("%sIXON %sIXOFF\n", (lpdcb->fOutX) ? "" : "~", (lpdcb->fInX) ? "" : "~"); + TRACE("fOutxCtsFlow=%d fRtsControl=%d\n", lpdcb->fOutxCtsFlow, lpdcb->fRtsControl); + TRACE("fOutxDsrFlow=%d fDtrControl=%d\n", lpdcb->fOutxDsrFlow, lpdcb->fDtrControl); + if (lpdcb->fOutxCtsFlow || lpdcb->fRtsControl == RTS_CONTROL_HANDSHAKE) + TRACE("CRTSCTS\n"); + else + TRACE("~CRTSCTS\n"); +} + +/***************************************************************************** + * SetCommState (KERNEL32.@) + * + * Re-initializes all hardware and control settings of a communications device, + * with values from a device control block without affecting the input and output + * queues. + * + * PARAMS + * + * handle [in] The communications device + * lpdcb [out] The device control block + * + * RETURNS + * + * True on success, false on failure, e.g., if the XonChar is equal to the XoffChar. + */ +BOOL WINAPI SetCommState( HANDLE handle, LPDCB lpdcb) +{ + SERIAL_BAUD_RATE sbr; + SERIAL_LINE_CONTROL slc; + SERIAL_HANDFLOW shf; + SERIAL_CHARS sc; + DWORD dwBytesReturned; + + if (lpdcb == NULL) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + dump_dcb(lpdcb); + + sbr.BaudRate = lpdcb->BaudRate; + + slc.StopBits = lpdcb->StopBits; + slc.Parity = lpdcb->Parity; + slc.WordLength = lpdcb->ByteSize; + + shf.ControlHandShake = 0; + shf.FlowReplace = 0; + if (lpdcb->fOutxCtsFlow) shf.ControlHandShake |= SERIAL_CTS_HANDSHAKE; + if (lpdcb->fOutxDsrFlow) shf.ControlHandShake |= SERIAL_DSR_HANDSHAKE; + switch (lpdcb->fDtrControl) + { + case DTR_CONTROL_DISABLE: break; + case DTR_CONTROL_ENABLE: shf.ControlHandShake |= SERIAL_DTR_CONTROL; break; + case DTR_CONTROL_HANDSHAKE: shf.ControlHandShake |= SERIAL_DTR_HANDSHAKE;break; + default: + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + switch (lpdcb->fRtsControl) + { + case RTS_CONTROL_DISABLE: break; + case RTS_CONTROL_ENABLE: shf.FlowReplace |= SERIAL_RTS_CONTROL; break; + case RTS_CONTROL_HANDSHAKE: shf.FlowReplace |= SERIAL_RTS_HANDSHAKE; break; + case RTS_CONTROL_TOGGLE: shf.FlowReplace |= SERIAL_RTS_CONTROL | + SERIAL_RTS_HANDSHAKE; break; + default: + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if (lpdcb->fDsrSensitivity) shf.ControlHandShake |= SERIAL_DSR_SENSITIVITY; + if (lpdcb->fAbortOnError) shf.ControlHandShake |= SERIAL_ERROR_ABORT; + + if (lpdcb->fErrorChar) shf.FlowReplace |= SERIAL_ERROR_CHAR; + if (lpdcb->fNull) shf.FlowReplace |= SERIAL_NULL_STRIPPING; + if (lpdcb->fTXContinueOnXoff) shf.FlowReplace |= SERIAL_XOFF_CONTINUE; + if (lpdcb->fOutX) shf.FlowReplace |= SERIAL_AUTO_TRANSMIT; + if (lpdcb->fInX) shf.FlowReplace |= SERIAL_AUTO_RECEIVE; + + shf.XonLimit = lpdcb->XonLim; + shf.XoffLimit = lpdcb->XoffLim; + + sc.EofChar = lpdcb->EofChar; + sc.ErrorChar = lpdcb->ErrorChar; + sc.BreakChar = 0; + sc.EventChar = lpdcb->EvtChar; + sc.XonChar = lpdcb->XonChar; + sc.XoffChar = lpdcb->XoffChar; + + /* note: change DTR/RTS lines after setting the comm attributes, + * so flow control does not interfere. + */ + return (DeviceIoControl(handle, IOCTL_SERIAL_SET_BAUD_RATE, + &sbr, sizeof(sbr), NULL, 0, &dwBytesReturned, NULL) && + DeviceIoControl(handle, IOCTL_SERIAL_SET_LINE_CONTROL, + &slc, sizeof(slc), NULL, 0, &dwBytesReturned, NULL) && + DeviceIoControl(handle, IOCTL_SERIAL_SET_HANDFLOW, + &shf, sizeof(shf), NULL, 0, &dwBytesReturned, NULL) && + DeviceIoControl(handle, IOCTL_SERIAL_SET_CHARS, + &sc, sizeof(sc), NULL, 0, &dwBytesReturned, NULL)); } -/* - * @implemented +/***************************************************************************** + * GetCommState (KERNEL32.@) + * + * Fills in a device control block with information from a communications device. + * + * PARAMS + * handle [in] The communications device + * lpdcb [out] The device control block + * + * RETURNS + * + * True on success, false if the communication device handle is bad etc + * + * BUGS + * + * XonChar and XoffChar are not set. */ -BOOL -WINAPI -GetDefaultCommConfigW(LPCWSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize) +BOOL WINAPI GetCommState(HANDLE handle, LPDCB lpdcb) { - FARPROC pGetDefaultCommConfig; + SERIAL_BAUD_RATE sbr; + SERIAL_LINE_CONTROL slc; + SERIAL_HANDFLOW shf; + SERIAL_CHARS sc; + DWORD dwBytesReturned; + + TRACE("handle %p, ptr %p\n", handle, lpdcb); + + if (!lpdcb) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if (!DeviceIoControl(handle, IOCTL_SERIAL_GET_BAUD_RATE, + NULL, 0, &sbr, sizeof(sbr), &dwBytesReturned, NULL) || + !DeviceIoControl(handle, IOCTL_SERIAL_GET_LINE_CONTROL, + NULL, 0, &slc, sizeof(slc), &dwBytesReturned, NULL) || + !DeviceIoControl(handle, IOCTL_SERIAL_GET_HANDFLOW, + NULL, 0, &shf, sizeof(shf), &dwBytesReturned, NULL) || + !DeviceIoControl(handle, IOCTL_SERIAL_GET_CHARS, + NULL, 0, &sc, sizeof(sc), &dwBytesReturned, NULL)) + return FALSE; + + memset(lpdcb, 0, sizeof(*lpdcb)); + lpdcb->DCBlength = sizeof(*lpdcb); + + /* yes, they seem no never be (re)set on NT */ + lpdcb->fBinary = 1; + lpdcb->fParity = 0; + + lpdcb->BaudRate = sbr.BaudRate; + + lpdcb->StopBits = slc.StopBits; + lpdcb->Parity = slc.Parity; + lpdcb->ByteSize = slc.WordLength; + + if (shf.ControlHandShake & SERIAL_CTS_HANDSHAKE) lpdcb->fOutxCtsFlow = 1; + if (shf.ControlHandShake & SERIAL_DSR_HANDSHAKE) lpdcb->fOutxDsrFlow = 1; + switch (shf.ControlHandShake & (SERIAL_DTR_CONTROL | SERIAL_DTR_HANDSHAKE)) + { + case 0: lpdcb->fDtrControl = DTR_CONTROL_DISABLE; break; + case SERIAL_DTR_CONTROL: lpdcb->fDtrControl = DTR_CONTROL_ENABLE; break; + case SERIAL_DTR_HANDSHAKE: lpdcb->fDtrControl = DTR_CONTROL_HANDSHAKE; break; + } + switch (shf.FlowReplace & (SERIAL_RTS_CONTROL | SERIAL_RTS_HANDSHAKE)) + { + case 0: lpdcb->fRtsControl = RTS_CONTROL_DISABLE; break; + case SERIAL_RTS_CONTROL: lpdcb->fRtsControl = RTS_CONTROL_ENABLE; break; + case SERIAL_RTS_HANDSHAKE: lpdcb->fRtsControl = RTS_CONTROL_HANDSHAKE; break; + case SERIAL_RTS_CONTROL | SERIAL_RTS_HANDSHAKE: + lpdcb->fRtsControl = RTS_CONTROL_TOGGLE; break; + } + if (shf.ControlHandShake & SERIAL_DSR_SENSITIVITY) lpdcb->fDsrSensitivity = 1; + if (shf.ControlHandShake & SERIAL_ERROR_ABORT) lpdcb->fAbortOnError = 1; + if (shf.FlowReplace & SERIAL_ERROR_CHAR) lpdcb->fErrorChar = 1; + if (shf.FlowReplace & SERIAL_NULL_STRIPPING) lpdcb->fNull = 1; + if (shf.FlowReplace & SERIAL_XOFF_CONTINUE) lpdcb->fTXContinueOnXoff = 1; + lpdcb->XonLim = shf.XonLimit; + lpdcb->XoffLim = shf.XoffLimit; + + if (shf.FlowReplace & SERIAL_AUTO_TRANSMIT) lpdcb->fOutX = 1; + if (shf.FlowReplace & SERIAL_AUTO_RECEIVE) lpdcb->fInX = 1; + + lpdcb->EofChar = sc.EofChar; + lpdcb->ErrorChar = sc.ErrorChar; + lpdcb->EvtChar = sc.EventChar; + lpdcb->XonChar = sc.XonChar; + lpdcb->XoffChar = sc.XoffChar; + + TRACE("OK\n"); + dump_dcb(lpdcb); + + return TRUE; +} + +/***************************************************************************** + * TransmitCommChar (KERNEL32.@) + * + * Transmits a single character in front of any pending characters in the + * output buffer. Usually used to send an interrupt character to a host. + * + * PARAMS + * hComm [in] The communication device in need of a command character + * chTransmit [in] The character to transmit + * + * RETURNS + * + * True if the call succeeded, false if the previous command character to the + * same device has not been sent yet the handle is bad etc. + * + */ +BOOL WINAPI TransmitCommChar(HANDLE hComm, CHAR chTransmit) +{ + DWORD dwBytesReturned; + return DeviceIoControl(hComm, IOCTL_SERIAL_IMMEDIATE_CHAR, + &chTransmit, sizeof(chTransmit), NULL, 0, &dwBytesReturned, NULL); +} + + +/***************************************************************************** + * GetCommTimeouts (KERNEL32.@) + * + * Obtains the request timeout values for the communications device. + * + * PARAMS + * hComm [in] The communications device + * lptimeouts [out] The struct of request timeouts + * + * RETURNS + * + * True on success, false if communications device handle is bad + * or the target structure is null. + */ +BOOL WINAPI GetCommTimeouts(HANDLE hComm, LPCOMMTIMEOUTS lptimeouts) +{ + SERIAL_TIMEOUTS st; + DWORD dwBytesReturned; + + TRACE("(%p, %p)\n", hComm, lptimeouts); + if (!lptimeouts) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if (!DeviceIoControl(hComm, IOCTL_SERIAL_GET_TIMEOUTS, + NULL, 0, &st, sizeof(st), &dwBytesReturned, NULL)) + return FALSE; + lptimeouts->ReadIntervalTimeout = st.ReadIntervalTimeout; + lptimeouts->ReadTotalTimeoutMultiplier = st.ReadTotalTimeoutMultiplier; + lptimeouts->ReadTotalTimeoutConstant = st.ReadTotalTimeoutConstant; + lptimeouts->WriteTotalTimeoutMultiplier = st.WriteTotalTimeoutMultiplier; + lptimeouts->WriteTotalTimeoutConstant = st.WriteTotalTimeoutConstant; + return TRUE; +} + +/***************************************************************************** + * SetCommTimeouts (KERNEL32.@) + * + * Sets the timeouts used when reading and writing data to/from COMM ports. + * + * PARAMS + * hComm [in] handle of COMM device + * lptimeouts [in] pointer to COMMTIMEOUTS structure + * + * ReadIntervalTimeout + * - converted and passes to linux kernel as c_cc[VTIME] + * ReadTotalTimeoutMultiplier, ReadTotalTimeoutConstant + * - used in ReadFile to calculate GetOverlappedResult's timeout + * WriteTotalTimeoutMultiplier, WriteTotalTimeoutConstant + * - used in WriteFile to calculate GetOverlappedResult's timeout + * + * RETURNS + * + * True if the timeouts were set, false otherwise. + */ +BOOL WINAPI SetCommTimeouts(HANDLE hComm, LPCOMMTIMEOUTS lptimeouts) +{ + SERIAL_TIMEOUTS st; + DWORD dwBytesReturned; + + TRACE("(%p, %p)\n", hComm, lptimeouts); + + if (lptimeouts == NULL) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + st.ReadIntervalTimeout = lptimeouts->ReadIntervalTimeout; + st.ReadTotalTimeoutMultiplier = lptimeouts->ReadTotalTimeoutMultiplier; + st.ReadTotalTimeoutConstant = lptimeouts->ReadTotalTimeoutConstant; + st.WriteTotalTimeoutMultiplier = lptimeouts->WriteTotalTimeoutMultiplier; + st.WriteTotalTimeoutConstant = lptimeouts->WriteTotalTimeoutConstant; + + return DeviceIoControl(hComm, IOCTL_SERIAL_SET_TIMEOUTS, + &st, sizeof(st), NULL, 0, &dwBytesReturned, NULL); +} + +/*********************************************************************** + * GetCommModemStatus (KERNEL32.@) + * + * Obtains the four control register bits if supported by the hardware. + * + * PARAMS + * + * hFile [in] The communications device + * lpModemStat [out] The control register bits + * + * RETURNS + * + * True if the communications handle was good and for hardware that + * control register access, false otherwise. + */ +BOOL WINAPI GetCommModemStatus(HANDLE hFile, LPDWORD lpModemStat) +{ + DWORD dwBytesReturned; + return DeviceIoControl(hFile, IOCTL_SERIAL_GET_MODEMSTATUS, + NULL, 0, lpModemStat, sizeof(DWORD), &dwBytesReturned, NULL); +} + +/*********************************************************************** + * WaitCommEvent (KERNEL32.@) + * + * Wait until something interesting happens on a COMM port. + * Interesting things (events) are set by calling SetCommMask before + * this function is called. + * + * RETURNS + * TRUE if successful + * FALSE if failure + * + * The set of detected events will be written to *lpdwEventMask + * ERROR_IO_PENDING will be returned the overlapped structure was passed + * + * BUGS: + * Only supports EV_RXCHAR and EV_TXEMPTY + */ +BOOL WINAPI WaitCommEvent( + HANDLE hFile, /* [in] handle of comm port to wait for */ + LPDWORD lpdwEvents, /* [out] event(s) that were detected */ + LPOVERLAPPED lpOverlapped) /* [in/out] for Asynchronous waiting */ +{ + return DeviceIoControl(hFile, IOCTL_SERIAL_WAIT_ON_MASK, NULL, 0, + lpdwEvents, sizeof(DWORD), NULL, lpOverlapped); +} + +/*********************************************************************** + * GetCommProperties (KERNEL32.@) + * + * This function fills in a structure with the capabilities of the + * communications port driver. + * + * RETURNS + * + * TRUE on success, FALSE on failure + * If successful, the lpCommProp structure be filled in with + * properties of the comm port. + */ +BOOL WINAPI GetCommProperties( + HANDLE hFile, /* [in] handle of the comm port */ + LPCOMMPROP lpCommProp) /* [out] pointer to struct to be filled */ +{ + TRACE("(%p %p)\n",hFile,lpCommProp); + if(!lpCommProp) + return FALSE; + + /* + * These values should be valid for LINUX's serial driver + * FIXME: Perhaps they deserve an #ifdef LINUX + */ + memset(lpCommProp,0,sizeof(COMMPROP)); + lpCommProp->wPacketLength = 1; + lpCommProp->wPacketVersion = 1; + lpCommProp->dwServiceMask = SP_SERIALCOMM; + lpCommProp->dwMaxTxQueue = 4096; + lpCommProp->dwMaxRxQueue = 4096; + lpCommProp->dwMaxBaud = BAUD_115200; + lpCommProp->dwProvSubType = PST_RS232; + lpCommProp->dwProvCapabilities = PCF_DTRDSR | PCF_PARITY_CHECK | PCF_RTSCTS | PCF_TOTALTIMEOUTS; + lpCommProp->dwSettableParams = SP_BAUD | SP_DATABITS | SP_HANDSHAKING | + SP_PARITY | SP_PARITY_CHECK | SP_STOPBITS ; + lpCommProp->dwSettableBaud = BAUD_075 | BAUD_110 | BAUD_134_5 | BAUD_150 | + BAUD_300 | BAUD_600 | BAUD_1200 | BAUD_1800 | BAUD_2400 | BAUD_4800 | + BAUD_9600 | BAUD_19200 | BAUD_38400 | BAUD_57600 | BAUD_115200 ; + lpCommProp->wSettableData = DATABITS_5 | DATABITS_6 | DATABITS_7 | DATABITS_8 ; + lpCommProp->wSettableStopParity = STOPBITS_10 | STOPBITS_15 | STOPBITS_20 | + PARITY_NONE | PARITY_ODD |PARITY_EVEN | PARITY_MARK | PARITY_SPACE; + lpCommProp->dwCurrentTxQueue = lpCommProp->dwMaxTxQueue; + lpCommProp->dwCurrentRxQueue = lpCommProp->dwMaxRxQueue; + + return TRUE; +} + +/*********************************************************************** + * FIXME: + * The functionality of CommConfigDialogA, GetDefaultCommConfig and + * SetDefaultCommConfig is implemented in a DLL (usually SERIALUI.DLL). + * This is dependent on the type of COMM port, but since it is doubtful + * anybody will get around to implementing support for fancy serial + * ports in WINE, this is hardcoded for the time being. The name of + * this DLL should be stored in and read from the system registry in + * the hive HKEY_LOCAL_MACHINE, key + * System\\CurrentControlSet\\Services\\Class\\Ports\\???? + * where ???? is the port number... that is determined by PNP + * The DLL should be loaded when the COMM port is opened, and closed + * when the COMM port is closed. - MJM 20 June 2000 + ***********************************************************************/ +static const WCHAR lpszSerialUI[] = { + 's','e','r','i','a','l','u','i','.','d','l','l',0 }; + + +/*********************************************************************** + * CommConfigDialogA (KERNEL32.@) + * + * Raises a dialog that allows the user to configure a comm port. + * Fills the COMMCONFIG struct with information specified by the user. + * This function should call a similar routine in the COMM driver... + * + * RETURNS + * + * TRUE on success, FALSE on failure + * If successful, the lpCommConfig structure will contain a new + * configuration for the comm port, as specified by the user. + * + * BUGS + * The library with the CommConfigDialog code is never unloaded. + * Perhaps this should be done when the comm port is closed? + */ +BOOL WINAPI CommConfigDialogA( + LPCSTR lpszDevice, /* [in] name of communications device */ + HWND hWnd, /* [in] parent window for the dialog */ + LPCOMMCONFIG lpCommConfig) /* [out] pointer to struct to fill */ +{ + LPWSTR lpDeviceW = NULL; + DWORD len; + BOOL r; + + TRACE("(%s, %p, %p)\n", debugstr_a(lpszDevice), hWnd, lpCommConfig); + + if (lpszDevice) + { + len = MultiByteToWideChar( CP_ACP, 0, lpszDevice, -1, NULL, 0 ); + lpDeviceW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, lpszDevice, -1, lpDeviceW, len ); + } + r = CommConfigDialogW(lpDeviceW, hWnd, lpCommConfig); + HeapFree( GetProcessHeap(), 0, lpDeviceW ); + return r; +} + +/*********************************************************************** + * CommConfigDialogW (KERNEL32.@) + * + * See CommConfigDialogA. + */ +BOOL WINAPI CommConfigDialogW( + LPCWSTR lpszDevice, /* [in] name of communications device */ + HWND hWnd, /* [in] parent window for the dialog */ + LPCOMMCONFIG lpCommConfig) /* [out] pointer to struct to fill */ +{ + DWORD (WINAPI *pCommConfigDialog)(LPCWSTR, HWND, LPCOMMCONFIG); HMODULE hConfigModule; DWORD res = ERROR_INVALID_PARAMETER; - DPRINT("(%s, %p, %p) *lpdwSize: %u\n", lpszName, lpCC, lpdwSize, lpdwSize ? *lpdwSize : 0 ); + TRACE("(%s, %p, %p)\n", debugstr_w(lpszDevice), hWnd, lpCommConfig); hConfigModule = LoadLibraryW(lpszSerialUI); if (hConfigModule) { - pGetDefaultCommConfig = GetProcAddress(hConfigModule, "drvGetDefaultCommConfigW"); + pCommConfigDialog = (void *)GetProcAddress(hConfigModule, "drvCommConfigDialogW"); + if (pCommConfigDialog) { + res = pCommConfigDialog(lpszDevice, hWnd, lpCommConfig); + } + FreeLibrary(hConfigModule); + } + + if (res) SetLastError(res); + return (res == ERROR_SUCCESS); +} + +/*********************************************************************** + * GetCommConfig (KERNEL32.@) + * + * Fill in the COMMCONFIG structure for the comm port hFile + * + * RETURNS + * + * TRUE on success, FALSE on failure + * If successful, lpCommConfig contains the comm port configuration. + * + * BUGS + * + */ +BOOL WINAPI GetCommConfig( + HANDLE hFile, /* [in] The communications device. */ + LPCOMMCONFIG lpCommConfig, /* [out] The communications configuration of the device (if it fits). */ + LPDWORD lpdwSize) /* [in/out] Initially the size of the configuration buffer/structure, + afterwards the number of bytes copied to the buffer or + the needed size of the buffer. */ +{ + BOOL r; + + TRACE("(%p, %p, %p) *lpdwSize: %u\n", hFile, lpCommConfig, lpdwSize, lpdwSize ? *lpdwSize : 0 ); + + if(lpCommConfig == NULL) + return FALSE; + r = *lpdwSize < sizeof(COMMCONFIG); /* TRUE if not enough space */ + *lpdwSize = sizeof(COMMCONFIG); + if(r) + return FALSE; + + lpCommConfig->dwSize = sizeof(COMMCONFIG); + lpCommConfig->wVersion = 1; + lpCommConfig->wReserved = 0; + r = GetCommState(hFile,&lpCommConfig->dcb); + lpCommConfig->dwProviderSubType = PST_RS232; + lpCommConfig->dwProviderOffset = 0; + lpCommConfig->dwProviderSize = 0; + + return r; +} + +/*********************************************************************** + * SetCommConfig (KERNEL32.@) + * + * Sets the configuration of the communications device. + * + * RETURNS + * + * True on success, false if the handle was bad is not a communications device. + */ +BOOL WINAPI SetCommConfig( + HANDLE hFile, /* [in] The communications device. */ + LPCOMMCONFIG lpCommConfig, /* [in] The desired configuration. */ + DWORD dwSize) /* [in] size of the lpCommConfig struct */ +{ + TRACE("(%p, %p, %u)\n", hFile, lpCommConfig, dwSize); + return SetCommState(hFile,&lpCommConfig->dcb); +} + +/*********************************************************************** + * SetDefaultCommConfigW (KERNEL32.@) + * + * Initializes the default configuration for a communication device. + * + * PARAMS + * lpszDevice [I] Name of the device targeted for configuration + * lpCommConfig [I] PTR to a buffer with the configuration for the device + * dwSize [I] Number of bytes in the buffer + * + * RETURNS + * Failure: FALSE + * Success: TRUE, and default configuration saved + * + */ +BOOL WINAPI SetDefaultCommConfigW(LPCWSTR lpszDevice, LPCOMMCONFIG lpCommConfig, DWORD dwSize) +{ + BOOL (WINAPI *lpfnSetDefaultCommConfig)(LPCWSTR, LPCOMMCONFIG, DWORD); + HMODULE hConfigModule; + BOOL r = FALSE; + + TRACE("(%s, %p, %u)\n", debugstr_w(lpszDevice), lpCommConfig, dwSize); + + hConfigModule = LoadLibraryW(lpszSerialUI); + if(!hConfigModule) + return r; + + lpfnSetDefaultCommConfig = (void *)GetProcAddress(hConfigModule, "drvSetDefaultCommConfigW"); + if (lpfnSetDefaultCommConfig) + r = lpfnSetDefaultCommConfig(lpszDevice, lpCommConfig, dwSize); + + FreeLibrary(hConfigModule); + + return r; +} + + +/*********************************************************************** + * SetDefaultCommConfigA (KERNEL32.@) + * + * Initializes the default configuration for a communication device. + * + * See SetDefaultCommConfigW. + * + */ +BOOL WINAPI SetDefaultCommConfigA(LPCSTR lpszDevice, LPCOMMCONFIG lpCommConfig, DWORD dwSize) +{ + BOOL r; + LPWSTR lpDeviceW = NULL; + DWORD len; + + TRACE("(%s, %p, %u)\n", debugstr_a(lpszDevice), lpCommConfig, dwSize); + + if (lpszDevice) + { + len = MultiByteToWideChar( CP_ACP, 0, lpszDevice, -1, NULL, 0 ); + lpDeviceW = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) ); + MultiByteToWideChar( CP_ACP, 0, lpszDevice, -1, lpDeviceW, len ); + } + r = SetDefaultCommConfigW(lpDeviceW,lpCommConfig,dwSize); + HeapFree( GetProcessHeap(), 0, lpDeviceW ); + return r; +} + + +/*********************************************************************** + * GetDefaultCommConfigW (KERNEL32.@) + * + * Acquires the default configuration of the specified communication device. (unicode) + * + * RETURNS + * + * True on successful reading of the default configuration, + * if the device is not found or the buffer is too small. + */ +BOOL WINAPI GetDefaultCommConfigW( + LPCWSTR lpszName, /* [in] The unicode name of the device targeted for configuration. */ + LPCOMMCONFIG lpCC, /* [out] The default configuration for the device. */ + LPDWORD lpdwSize) /* [in/out] Initially the size of the default configuration buffer, + afterwards the number of bytes copied to the buffer or + the needed size of the buffer. */ +{ + DWORD (WINAPI *pGetDefaultCommConfig)(LPCWSTR, LPCOMMCONFIG, LPDWORD); + HMODULE hConfigModule; + DWORD res = ERROR_INVALID_PARAMETER; + + TRACE("(%s, %p, %p) *lpdwSize: %u\n", debugstr_w(lpszName), lpCC, lpdwSize, lpdwSize ? *lpdwSize : 0 ); + hConfigModule = LoadLibraryW(lpszSerialUI); + + if (hConfigModule) { + pGetDefaultCommConfig = (void *)GetProcAddress(hConfigModule, "drvGetDefaultCommConfigW"); if (pGetDefaultCommConfig) { res = pGetDefaultCommConfig(lpszName, lpCC, lpdwSize); } @@ -485,18 +1437,27 @@ GetDefaultCommConfigW(LPCWSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize) return (res == ERROR_SUCCESS); } - -/* - * @implemented +/************************************************************************** + * GetDefaultCommConfigA (KERNEL32.@) + * + * Acquires the default configuration of the specified communication device. (ascii) + * + * RETURNS + * + * True on successful reading of the default configuration, + * if the device is not found or the buffer is too small. */ -BOOL -WINAPI -GetDefaultCommConfigA(LPCSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize) +BOOL WINAPI GetDefaultCommConfigA( + LPCSTR lpszName, /* [in] The ascii name of the device targeted for configuration. */ + LPCOMMCONFIG lpCC, /* [out] The default configuration for the device. */ + LPDWORD lpdwSize) /* [in/out] Initially the size of the default configuration buffer, + afterwards the number of bytes copied to the buffer or + the needed size of the buffer. */ { BOOL ret = FALSE; UNICODE_STRING lpszNameW; - DPRINT("(%s, %p, %p) *lpdwSize: %u\n", lpszName, lpCC, lpdwSize, lpdwSize ? *lpdwSize : 0 ); + TRACE("(%s, %p, %p) *lpdwSize: %u\n", debugstr_a(lpszName), lpCC, lpdwSize, lpdwSize ? *lpdwSize : 0 ); if(lpszName) RtlCreateUnicodeStringFromAsciiz(&lpszNameW,lpszName); else lpszNameW.Buffer = NULL; @@ -505,330 +1466,3 @@ GetDefaultCommConfigA(LPCSTR lpszName, LPCOMMCONFIG lpCC, LPDWORD lpdwSize) RtlFreeUnicodeString(&lpszNameW); return ret; } - - -/* - * @implemented - */ -BOOL -WINAPI -PurgeComm(HANDLE hFile, DWORD dwFlags) -{ - DWORD dwBytesReturned; - - return DeviceIoControl(hFile, IOCTL_SERIAL_PURGE, - &dwFlags, sizeof(DWORD), NULL, 0, &dwBytesReturned, NULL); -} - - -/* - * @implemented - */ -BOOL -WINAPI -SetCommBreak(HANDLE hFile) -{ - DWORD dwBytesReturned; - - return DeviceIoControl(hFile, IOCTL_SERIAL_SET_BREAK_ON, NULL, 0, NULL, 0, &dwBytesReturned, NULL); -} - - -/* - * @implemented - */ -BOOL -WINAPI -SetCommConfig(HANDLE hCommDev, LPCOMMCONFIG lpCC, DWORD dwSize) -{ - BOOL ReturnValue = FALSE; - - DPRINT("SetCommConfig(%d, %p, %d)\n", hCommDev, lpCC, dwSize); - - if(NULL == lpCC) - { - DPRINT("SetCommConfig() - invalid parameter\n"); - SetLastError(ERROR_INVALID_PARAMETER); - ReturnValue = FALSE; - } - else - { - ReturnValue = SetCommState(hCommDev, &lpCC->dcb); - } - - return ReturnValue; -} - - -/* - * @implemented - */ -BOOL -WINAPI -SetCommMask(HANDLE hFile, DWORD dwEvtMask) -{ - DWORD dwBytesReturned; - - return DeviceIoControl(hFile, IOCTL_SERIAL_SET_WAIT_MASK, - &dwEvtMask, sizeof(DWORD), NULL, 0, &dwBytesReturned, NULL); -} - - -/* - * @implemented - */ -BOOL -WINAPI -SetCommState(HANDLE hFile, LPDCB lpDCB) -{ - BOOL result = FALSE; - DWORD dwBytesReturned; - - SERIAL_BAUD_RATE BaudRate; - SERIAL_HANDFLOW HandFlow; - SERIAL_CHARS SpecialChars; - SERIAL_LINE_CONTROL LineControl; - - DPRINT("SetCommState(%d, %p) - ENTERED\n", hFile, lpDCB); - - if (lpDCB == NULL) { - DPRINT("SetCommState() - ERROR: NULL DCB pointer passed\n"); - return FALSE; - } - - BaudRate.BaudRate = lpDCB->BaudRate; - result = DeviceIoControl(hFile, IOCTL_SERIAL_SET_BAUD_RATE, - &BaudRate, sizeof(BaudRate), NULL, 0, &dwBytesReturned, NULL); - if (!NT_SUCCESS(result)) { - DPRINT("ERROR: SetCommState() - DeviceIoControl(IOCTL_SERIAL_SET_BAUD_RATE) Failed.\n"); - return FALSE; - } -/* -#define SERIAL_DTR_MASK ((ULONG)0x03) -#define SERIAL_DTR_CONTROL ((ULONG)0x01) -#define SERIAL_DTR_HANDSHAKE ((ULONG)0x02) -#define SERIAL_CTS_HANDSHAKE ((ULONG)0x08) -#define SERIAL_DSR_HANDSHAKE ((ULONG)0x10) -#define SERIAL_DCD_HANDSHAKE ((ULONG)0x20) -#define SERIAL_OUT_HANDSHAKEMASK ((ULONG)0x38) -#define SERIAL_DSR_SENSITIVITY ((ULONG)0x40) -#define SERIAL_ERROR_ABORT ((ULONG)0x80000000) -#define SERIAL_CONTROL_INVALID ((ULONG)0x7fffff84) - */ - HandFlow.ControlHandShake = 0; - - if (lpDCB->fOutxCtsFlow) { - HandFlow.ControlHandShake |= SERIAL_CTS_HANDSHAKE; - } - if (lpDCB->fOutxDsrFlow) { - HandFlow.ControlHandShake |= SERIAL_DSR_HANDSHAKE; - } - if (lpDCB->fDtrControl) { - HandFlow.ControlHandShake |= SERIAL_DTR_CONTROL; - } - if (lpDCB->fDtrControl) { - HandFlow.ControlHandShake |= SERIAL_DTR_HANDSHAKE; - } - if (lpDCB->fRtsControl) { - HandFlow.ControlHandShake |= SERIAL_RTS_CONTROL; - } - if (lpDCB->fRtsControl) { - HandFlow.ControlHandShake |= SERIAL_RTS_HANDSHAKE; - } - if (lpDCB->fDsrSensitivity) { - HandFlow.ControlHandShake |= SERIAL_DSR_SENSITIVITY; - } - if (lpDCB->fAbortOnError) { - HandFlow.ControlHandShake |= SERIAL_ERROR_ABORT; - } -/* -#define SERIAL_AUTO_TRANSMIT ((ULONG)0x01) -#define SERIAL_AUTO_RECEIVE ((ULONG)0x02) -#define SERIAL_ERROR_CHAR ((ULONG)0x04) -#define SERIAL_NULL_STRIPPING ((ULONG)0x08) -#define SERIAL_BREAK_CHAR ((ULONG)0x10) -#define SERIAL_RTS_MASK ((ULONG)0xc0) -#define SERIAL_RTS_CONTROL ((ULONG)0x40) -#define SERIAL_RTS_HANDSHAKE ((ULONG)0x80) -#define SERIAL_TRANSMIT_TOGGLE ((ULONG)0xc0) -#define SERIAL_XOFF_CONTINUE ((ULONG)0x80000000) -#define SERIAL_FLOW_INVALID ((ULONG)0x7fffff20) - */ - HandFlow.FlowReplace = 0; - if (lpDCB->fErrorChar) { - HandFlow.FlowReplace |= SERIAL_ERROR_CHAR; - } - if (lpDCB->fNull) { - HandFlow.FlowReplace |= SERIAL_NULL_STRIPPING; - } - if (lpDCB->fTXContinueOnXoff) { - HandFlow.FlowReplace |= SERIAL_XOFF_CONTINUE; - } - HandFlow.XonLimit = lpDCB->XonLim; - HandFlow.XoffLimit = lpDCB->XoffLim; - result = DeviceIoControl(hFile, IOCTL_SERIAL_SET_HANDFLOW, - &HandFlow, sizeof(HandFlow), NULL, 0, &dwBytesReturned, NULL); - if (!NT_SUCCESS(result)) { - DPRINT("ERROR: SetCommState() - DeviceIoControl(IOCTL_SERIAL_SET_HANDFLOW) Failed.\n"); - return FALSE; - } - - SpecialChars.EofChar = lpDCB->EofChar; - SpecialChars.ErrorChar = lpDCB->ErrorChar; - SpecialChars.BreakChar = 0; - SpecialChars.EventChar = lpDCB->EvtChar; - SpecialChars.XonChar = lpDCB->XonChar; - SpecialChars.XoffChar = lpDCB->XoffChar; - result = DeviceIoControl(hFile, IOCTL_SERIAL_SET_CHARS, - &SpecialChars, sizeof(SpecialChars), NULL, 0, &dwBytesReturned, NULL); - if (!NT_SUCCESS(result)) { - DPRINT("ERROR: SetCommState() - DeviceIoControl(IOCTL_SERIAL_SET_CHARS) Failed.\n"); - return FALSE; - } - - LineControl.StopBits = lpDCB->StopBits; - LineControl.Parity = lpDCB->Parity; - LineControl.WordLength = lpDCB->ByteSize; - result = DeviceIoControl(hFile, IOCTL_SERIAL_SET_LINE_CONTROL, - &LineControl, sizeof(LineControl), NULL, 0, &dwBytesReturned, NULL); - if (!NT_SUCCESS(result)) { - DPRINT("ERROR: SetCommState() - DeviceIoControl(IOCTL_SERIAL_SET_LINE_CONTROL) Failed.\n"); - return FALSE; - } - - DPRINT("SetCommState() - COMPLETED SUCCESSFULLY\n"); - return TRUE; -} - - -/* - * @implemented - */ -BOOL -WINAPI -SetCommTimeouts(HANDLE hFile, LPCOMMTIMEOUTS lpCommTimeouts) -{ - DWORD dwBytesReturned; - SERIAL_TIMEOUTS Timeouts; - - if (lpCommTimeouts == NULL) { - return FALSE; - } - Timeouts.ReadIntervalTimeout = lpCommTimeouts->ReadIntervalTimeout; - Timeouts.ReadTotalTimeoutMultiplier = lpCommTimeouts->ReadTotalTimeoutMultiplier; - Timeouts.ReadTotalTimeoutConstant = lpCommTimeouts->ReadTotalTimeoutConstant; - Timeouts.WriteTotalTimeoutMultiplier = lpCommTimeouts->WriteTotalTimeoutMultiplier; - Timeouts.WriteTotalTimeoutConstant = lpCommTimeouts->WriteTotalTimeoutConstant; - - return DeviceIoControl(hFile, IOCTL_SERIAL_SET_TIMEOUTS, - &Timeouts, sizeof(Timeouts), NULL, 0, &dwBytesReturned, NULL); -} - - -/* - * @implemented - */ -BOOL -WINAPI -SetDefaultCommConfigA(LPCSTR lpszName, LPCOMMCONFIG lpCC, DWORD dwSize) -{ - BOOL r; - LPWSTR lpDeviceW = NULL; - DWORD len; - - DPRINT("(%s, %p, %u)\n", lpszName, lpCC, dwSize); - - if (lpszName) - { - len = MultiByteToWideChar( CP_ACP, 0, lpszName, -1, NULL, 0 ); - - lpDeviceW = HeapAlloc( GetProcessHeap(), 0, len*sizeof(WCHAR) ); - if (!lpDeviceW) - { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } - - MultiByteToWideChar( CP_ACP, 0, lpszName, -1, lpDeviceW, len ); - } - r = SetDefaultCommConfigW(lpDeviceW,lpCC,dwSize); - HeapFree( GetProcessHeap(), 0, lpDeviceW ); - return r; -} - - -/* - * @implemented - */ -BOOL -WINAPI -SetDefaultCommConfigW(LPCWSTR lpszName, LPCOMMCONFIG lpCC, DWORD dwSize) -{ - FARPROC pGetDefaultCommConfig; - HMODULE hConfigModule; - DWORD res = ERROR_INVALID_PARAMETER; - - DPRINT("(%s, %p, %p) *dwSize: %u\n", lpszName, lpCC, dwSize, dwSize ? dwSize : 0 ); - hConfigModule = LoadLibraryW(lpszSerialUI); - - if (hConfigModule) { - pGetDefaultCommConfig = GetProcAddress(hConfigModule, "drvGetDefaultCommConfigW"); - if (pGetDefaultCommConfig) { - res = pGetDefaultCommConfig(lpszName, lpCC, &dwSize); - } - FreeLibrary(hConfigModule); - } - - if (res) SetLastError(res); - return (res == ERROR_SUCCESS); -} - - -/* - * @implemented - */ -BOOL -WINAPI -SetupComm(HANDLE hFile, DWORD dwInQueue, DWORD dwOutQueue) -{ - DWORD dwBytesReturned; - SERIAL_QUEUE_SIZE QueueSize; - - QueueSize.InSize = dwInQueue; - QueueSize.OutSize = dwOutQueue; - return DeviceIoControl(hFile, IOCTL_SERIAL_SET_QUEUE_SIZE, - &QueueSize, sizeof(QueueSize), NULL, 0, &dwBytesReturned, NULL); -} - - -/* - * @implemented - */ -BOOL -WINAPI -TransmitCommChar(HANDLE hFile, char cChar) -{ - DWORD dwBytesReturned; - return DeviceIoControl(hFile, IOCTL_SERIAL_IMMEDIATE_CHAR, - &cChar, sizeof(cChar), NULL, 0, &dwBytesReturned, NULL); -} - - -/* - * @implemented - */ -BOOL -WINAPI -WaitCommEvent(HANDLE hFile, LPDWORD lpEvtMask, LPOVERLAPPED lpOverlapped) -{ - DWORD dwBytesReturned; - - if (lpEvtMask == NULL) { - return FALSE; - } - - return DeviceIoControl(hFile, IOCTL_SERIAL_WAIT_ON_MASK, - NULL, 0, lpEvtMask, sizeof(DWORD), &dwBytesReturned, lpOverlapped); -} - -/* EOF */ diff --git a/reactos/dll/win32/kernel32/client/misc/commdcb.c b/reactos/dll/win32/kernel32/client/misc/commdcb.c index 8ddb9eda3a6..bb43d27c045 100644 --- a/reactos/dll/win32/kernel32/client/misc/commdcb.c +++ b/reactos/dll/win32/kernel32/client/misc/commdcb.c @@ -21,7 +21,7 @@ */ /* Parses a mode string for a serial port, in the same syntax as the mode.com command */ - +#if 0 #if defined(__REACTOS__) && defined(_KERNEL32_) #include @@ -671,3 +671,4 @@ DCB_BuildCommDCBW(LPCWSTR lpDef, LPDCB lpDCB) } /* EOF */ +#endif diff --git a/reactos/dll/win32/kernel32/client/misc/lzexpand.c b/reactos/dll/win32/kernel32/client/misc/lzexpand.c index 863988be92f..de068ecd91b 100644 --- a/reactos/dll/win32/kernel32/client/misc/lzexpand.c +++ b/reactos/dll/win32/kernel32/client/misc/lzexpand.c @@ -33,18 +33,29 @@ * o Check whether the return values are correct * */ - -//#include "config.h" - -#include -#define NDEBUG -#include -#include "lzexpand.h" - +//#include #define HFILE_ERROR ((HFILE)-1) +//#include "config.h" +#include +#include +#include +#include +#include +#ifdef HAVE_UNISTD_H +#include +#endif + +#include "windef.h" +#include "winbase.h" +#include "lzexpand.h" + +#include "wine/unicode.h" +#include "wine/debug.h" +WINE_DEFAULT_DEBUG_CHANNEL(file); + /* The readahead length of the decompressor. Reading single bytes - * using _hread() would be SLOW. + * using _lread() would be SLOW. */ #define GETLEN 2048 @@ -101,7 +112,7 @@ _lzget(struct lzstate *lzs,BYTE *b) { *b = lzs->get[lzs->getcur++]; return 1; } else { - int ret = _hread(lzs->realfd,lzs->get,GETLEN); + int ret = _lread(lzs->realfd,lzs->get,GETLEN); if (ret==HFILE_ERROR) return HFILE_ERROR; if (ret==0) @@ -128,7 +139,7 @@ static INT read_header(HFILE fd,struct lzfileheader *head) /* We can't directly read the lzfileheader struct due to * structure element alignment */ - if (_hread(fd,buf,LZ_HEADER_LEN)magic,buf,LZ_MAGIC_LEN); memcpy(&(head->compressiontype),buf+LZ_MAGIC_LEN,1); @@ -150,7 +161,7 @@ static INT read_header(HFILE fd,struct lzfileheader *head) */ INT WINAPI LZStart(void) { - DPRINT("(void)\n"); + TRACE("(void)\n"); return 1; } @@ -171,9 +182,9 @@ HFILE WINAPI LZInit( HFILE hfSrc ) struct lzfileheader head; struct lzstate *lzs; - int i, ret; + int i, ret; - DPRINT("(%d)\n",hfSrc); + TRACE("(%d)\n",hfSrc); ret=read_header(hfSrc,&head); if (ret<=0) { _llseek(hfSrc,0,SEEK_SET); @@ -181,19 +192,19 @@ HFILE WINAPI LZInit( HFILE hfSrc ) } for (i = 0; i < MAX_LZSTATES; i++) if (!lzstates[i]) break; if (i == MAX_LZSTATES) return LZERROR_GLOBALLOC; - lzstates[i] = lzs = RtlAllocateHeap( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct lzstate) ); + lzstates[i] = lzs = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*lzs) ); if(lzs == NULL) return LZERROR_GLOBALLOC; lzs->realfd = hfSrc; lzs->lastchar = head.lastchar; lzs->reallength = head.reallength; - lzs->get = RtlAllocateHeap( GetProcessHeap(), 0, GETLEN ); + lzs->get = HeapAlloc( GetProcessHeap(), 0, GETLEN ); lzs->getlen = 0; lzs->getcur = 0; if(lzs->get == NULL) { - RtlFreeHeap(GetProcessHeap(), 0, lzs); + HeapFree(GetProcessHeap(), 0, lzs); lzstates[i] = NULL; return LZERROR_GLOBALLOC; } @@ -211,7 +222,7 @@ HFILE WINAPI LZInit( HFILE hfSrc ) */ void WINAPI LZDone(void) { - DPRINT("(void)\n"); + TRACE("(void)\n"); } @@ -234,7 +245,7 @@ INT WINAPI GetExpandedNameA( LPSTR in, LPSTR out ) INT fnislowercased,ret,len; LPSTR s,t; - DPRINT("(%s)\n",in); + TRACE("(%s)\n",in); fd=OpenFile(in,&ofs,OF_READ); if (fd==HFILE_ERROR) return (INT)(INT16)LZERROR_BADINHANDLE; @@ -256,7 +267,7 @@ INT WINAPI GetExpandedNameA( LPSTR in, LPSTR out ) /* now mangle the basename */ if (!*s) { /* FIXME: hmm. shouldn't happen? */ - DPRINT("Specified a directory or what? (%s)\n",in); + WARN("Specified a directory or what? (%s)\n",in); _lclose(fd); return 1; } @@ -299,23 +310,14 @@ INT WINAPI GetExpandedNameA( LPSTR in, LPSTR out ) INT WINAPI GetExpandedNameW( LPWSTR in, LPWSTR out ) { INT ret; - DWORD len; - char *xin, *xout; - len = WideCharToMultiByte( CP_ACP, 0, in, -1, NULL, 0, NULL, NULL ); - xin = RtlAllocateHeap( RtlGetProcessHeap(), 0, len ); - if (xin == NULL) - return LZERROR_BADVALUE; - xout = RtlAllocateHeap( RtlGetProcessHeap(), 0, len+3 ); - if (xout == NULL) - { - RtlFreeHeap( RtlGetProcessHeap(), 0, xin ); - return LZERROR_BADVALUE; - } + DWORD len = WideCharToMultiByte( CP_ACP, 0, in, -1, NULL, 0, NULL, NULL ); + char *xin = HeapAlloc( GetProcessHeap(), 0, len ); + char *xout = HeapAlloc( GetProcessHeap(), 0, len+3 ); WideCharToMultiByte( CP_ACP, 0, in, -1, xin, len, NULL, NULL ); if ((ret = GetExpandedNameA( xin, xout )) > 0) - MultiByteToWideChar( CP_ACP, 0, xout, -1, out, wcslen(in)+4 ); - RtlFreeHeap( RtlGetProcessHeap(), 0, xin ); - RtlFreeHeap( RtlGetProcessHeap(), 0, xout ); + MultiByteToWideChar( CP_ACP, 0, xout, -1, out, strlenW(in)+4 ); + HeapFree( GetProcessHeap(), 0, xin ); + HeapFree( GetProcessHeap(), 0, xout ); return ret; } @@ -330,9 +332,9 @@ INT WINAPI LZRead( HFILE fd, LPSTR vbuf, INT toread ) struct lzstate *lzs; buf=(LPBYTE)vbuf; - DPRINT("(%d,%p,%d)\n",fd,buf,toread); + TRACE("(%d,%p,%d)\n",fd,buf,toread); howmuch=toread; - if (!(lzs = GET_LZ_STATE(fd))) return _hread(fd,buf,toread); + if (!(lzs = GET_LZ_STATE(fd))) return _lread(fd,buf,toread); /* The decompressor itself is in a define, cause we need it twice * in this function. (the decompressed byte will be in b) @@ -419,7 +421,7 @@ LONG WINAPI LZSeek( HFILE fd, LONG off, INT type ) struct lzstate *lzs; LONG newwanted; - DPRINT("(%d,%ld,%d)\n",fd,off,type); + TRACE("(%d,%d,%d)\n",fd,off,type); /* not compressed? just use normal _llseek() */ if (!(lzs = GET_LZ_STATE(fd))) return _llseek(fd,off,type); newwanted = lzs->realwanted; @@ -454,9 +456,9 @@ LONG WINAPI LZCopy( HFILE src, HFILE dest ) { int usedlzinit = 0, ret, wret; LONG len; - HFILE oldsrc = src, srcfd; - FILETIME filetime; - struct lzstate *lzs; + HFILE oldsrc = src, srcfd; + FILETIME filetime; + struct lzstate *lzs; #define BUFLEN 1000 CHAR buf[BUFLEN]; /* we need that weird typedef, for i can't seem to get function pointer @@ -466,7 +468,7 @@ LONG WINAPI LZCopy( HFILE src, HFILE dest ) _readfun xread; - DPRINT("(%d,%d)\n",src,dest); + TRACE("(%d,%d)\n",src,dest); if (!IS_LZ_HANDLE(src)) { src = LZInit(src); if ((INT)src <= 0) return 0; @@ -489,17 +491,17 @@ LONG WINAPI LZCopy( HFILE src, HFILE dest ) return ret; } len += ret; - wret = _hwrite(dest,buf,ret); + wret = _lwrite(dest,buf,ret); if (wret!=ret) return LZERROR_WRITE; } - /* Maintain the timestamp of source file to destination file */ - srcfd = (!(lzs = GET_LZ_STATE(src))) ? src : lzs->realfd; - GetFileTime( LongToHandle(srcfd), NULL, NULL, &filetime ); - SetFileTime( LongToHandle(dest), NULL, NULL, &filetime ); + /* Maintain the timestamp of source file to destination file */ + srcfd = (!(lzs = GET_LZ_STATE(src))) ? src : lzs->realfd; + GetFileTime( LongToHandle(srcfd), NULL, NULL, &filetime ); + SetFileTime( LongToHandle(dest), NULL, NULL, &filetime ); - /* close handle */ + /* close handle */ if (usedlzinit) LZClose(src); return len; @@ -510,7 +512,7 @@ LONG WINAPI LZCopy( HFILE src, HFILE dest ) static LPSTR LZEXPAND_MangleName( LPCSTR fn ) { char *p; - char *mfn = RtlAllocateHeap( GetProcessHeap(), 0, strlen(fn) + 3 ); /* "._" and \0 */ + char *mfn = HeapAlloc( GetProcessHeap(), 0, strlen(fn) + 3 ); /* "._" and \0 */ if(mfn == NULL) return NULL; strcpy( mfn, fn ); if (!(p = strrchr( mfn, '\\' ))) p = mfn; @@ -534,14 +536,14 @@ HFILE WINAPI LZOpenFileA( LPSTR fn, LPOFSTRUCT ofs, WORD mode ) { HFILE fd,cfd; - DPRINT("(%s,%p,%d)\n",fn,ofs,mode); + TRACE("(%s,%p,%d)\n",fn,ofs,mode); /* 0x70 represents all OF_SHARE_* flags, ignore them for the check */ fd=OpenFile(fn,ofs,mode); if (fd==HFILE_ERROR) { LPSTR mfn = LZEXPAND_MangleName(fn); fd = OpenFile(mfn,ofs,mode); - RtlFreeHeap( GetProcessHeap(), 0, mfn ); + HeapFree( GetProcessHeap(), 0, mfn ); } if ((mode&~0x70)!=OF_READ) return fd; @@ -560,10 +562,10 @@ HFILE WINAPI LZOpenFileW( LPWSTR fn, LPOFSTRUCT ofs, WORD mode ) { HFILE ret; DWORD len = WideCharToMultiByte( CP_ACP, 0, fn, -1, NULL, 0, NULL, NULL ); - LPSTR xfn = RtlAllocateHeap( GetProcessHeap(), 0, len ); + LPSTR xfn = HeapAlloc( GetProcessHeap(), 0, len ); WideCharToMultiByte( CP_ACP, 0, fn, -1, xfn, len, NULL, NULL ); ret = LZOpenFileA(xfn,ofs,mode); - RtlFreeHeap( GetProcessHeap(), 0, xfn ); + HeapFree( GetProcessHeap(), 0, xfn ); return ret; } @@ -575,14 +577,13 @@ void WINAPI LZClose( HFILE fd ) { struct lzstate *lzs; - DPRINT("(%d)\n",fd); + TRACE("(%d)\n",fd); if (!(lzs = GET_LZ_STATE(fd))) _lclose(fd); else { - if (lzs->get) RtlFreeHeap( GetProcessHeap(), 0, lzs->get ); + HeapFree( GetProcessHeap(), 0, lzs->get ); CloseHandle( LongToHandle(lzs->realfd) ); lzstates[fd - LZ_MIN_HANDLE] = NULL; - RtlFreeHeap( GetProcessHeap(), 0, lzs ); + HeapFree( GetProcessHeap(), 0, lzs ); } } - diff --git a/reactos/dll/win32/kernel32/client/misc/profile.c b/reactos/dll/win32/kernel32/client/misc/profile.c index 57805aa11dd..8a11132b58f 100644 --- a/reactos/dll/win32/kernel32/client/misc/profile.c +++ b/reactos/dll/win32/kernel32/client/misc/profile.c @@ -19,10 +19,22 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include +//#include "config.h" +//#include "wine/port.h" -#define NDEBUG -#include +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "winerror.h" +#include "winternl.h" +#include "wine/unicode.h" +#include "wine/library.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(profile); static const char bom_utf8[] = {0xEF,0xBB,0xBF}; @@ -77,13 +89,12 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug = { 0, 0, &PROFILE_CritSect, { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, - 0, 0, 0, 0, 0 + 0, 0, 0 }; static RTL_CRITICAL_SECTION PROFILE_CritSect = { &critsect_debug, -1, 0, 0, 0, 0 }; static const char hex[16] = "0123456789ABCDEF"; - /*********************************************************************** * PROFILE_CopyEntry * @@ -95,20 +106,19 @@ static void PROFILE_CopyEntry( LPWSTR buffer, LPCWSTR value, int len, { WCHAR quote = '\0'; - if (!buffer) return; + if(!buffer) return; if (strip_quote && ((*value == '\'') || (*value == '\"'))) { - if (value[1] && (value[wcslen(value)-1] == *value)) - quote = *value++; + if (value[1] && (value[strlenW(value)-1] == *value)) quote = *value++; } lstrcpynW( buffer, value, len ); - if (quote && (len >= (int)wcslen(value))) buffer[wcslen(buffer)-1] = '\0'; + if (quote && (len >= lstrlenW(value))) buffer[strlenW(buffer)-1] = '\0'; } /* byte-swaps shorts in-place in a buffer. len is in WCHARs */ -static __inline void PROFILE_ByteSwapShortBuffer(WCHAR * buffer, int len) +static inline void PROFILE_ByteSwapShortBuffer(WCHAR * buffer, int len) { int i; USHORT * shortbuffer = buffer; @@ -117,7 +127,7 @@ static __inline void PROFILE_ByteSwapShortBuffer(WCHAR * buffer, int len) } /* writes any necessary encoding marker to the file */ -static __inline void PROFILE_WriteMarker(HANDLE hFile, ENCODING encoding) +static inline void PROFILE_WriteMarker(HANDLE hFile, ENCODING encoding) { DWORD dwBytesWritten; WCHAR bom; @@ -145,7 +155,7 @@ static void PROFILE_WriteLine( HANDLE hFile, WCHAR * szLine, int len, ENCODING e int write_buffer_len; DWORD dwBytesWritten; - DPRINT("writing: %.*S\n", len, szLine); + TRACE("writing: %s\n", debugstr_wn(szLine, len)); switch (encoding) { @@ -173,7 +183,7 @@ static void PROFILE_WriteLine( HANDLE hFile, WCHAR * szLine, int len, ENCODING e WriteFile(hFile, szLine, len * sizeof(WCHAR), &dwBytesWritten, NULL); break; default: - DPRINT1("encoding type %d not implemented\n", encoding); + FIXME("encoding type %d not implemented\n", encoding); } } @@ -193,12 +203,12 @@ static void PROFILE_Save( HANDLE hFile, const PROFILESECTION *section, ENCODING { int len = 0; - if (section->name[0]) len += wcslen(section->name) + 4; + if (section->name[0]) len += strlenW(section->name) + 4; for (key = section->key; key; key = key->next) { - len += wcslen(key->name) + 2; - if (key->value) len += wcslen(key->value) + 1; + len += strlenW(key->name) + 2; + if (key->value) len += strlenW(key->value) + 1; } buffer = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); @@ -208,8 +218,8 @@ static void PROFILE_Save( HANDLE hFile, const PROFILESECTION *section, ENCODING if (section->name[0]) { *p++ = '['; - wcscpy( p, section->name ); - p += wcslen(p); + strcpyW( p, section->name ); + p += strlenW(p); *p++ = ']'; *p++ = '\r'; *p++ = '\n'; @@ -217,13 +227,13 @@ static void PROFILE_Save( HANDLE hFile, const PROFILESECTION *section, ENCODING for (key = section->key; key; key = key->next) { - wcscpy( p, key->name ); - p += wcslen(p); + strcpyW( p, key->name ); + p += strlenW(p); if (key->value) { *p++ = '='; - wcscpy( p, key->value ); - p += wcslen(p); + strcpyW( p, key->value ); + p += strlenW(p); } *p++ = '\r'; *p++ = '\n'; @@ -258,23 +268,23 @@ static void PROFILE_Free( PROFILESECTION *section ) } /* returns 1 if a character white space else 0 */ -static __inline int PROFILE_isspaceW(WCHAR c) +static inline int PROFILE_isspaceW(WCHAR c) { - /* ^Z (DOS EOF) is a space too (found on CD-ROMs) */ - return isspace(c) || c == 0x1a; + /* ^Z (DOS EOF) is a space too (found on CD-ROMs) */ + return isspaceW(c) || c == 0x1a; } -static __inline ENCODING PROFILE_DetectTextEncoding(const void * buffer, int * len) +static inline ENCODING PROFILE_DetectTextEncoding(const void * buffer, int * len) { - INT flags = IS_TEXT_UNICODE_SIGNATURE | - IS_TEXT_UNICODE_REVERSE_SIGNATURE | - IS_TEXT_UNICODE_ODD_LENGTH; + int flags = IS_TEXT_UNICODE_SIGNATURE | + IS_TEXT_UNICODE_REVERSE_SIGNATURE | + IS_TEXT_UNICODE_ODD_LENGTH; if (*len >= sizeof(bom_utf8) && !memcmp(buffer, bom_utf8, sizeof(bom_utf8))) { *len = sizeof(bom_utf8); return ENCODING_UTF8; } - RtlIsTextUnicode((void *)buffer, *len, &flags); + RtlIsTextUnicode(buffer, *len, &flags); if (flags & IS_TEXT_UNICODE_SIGNATURE) { *len = sizeof(WCHAR); @@ -306,9 +316,9 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding) PROFILESECTION **next_section; PROFILEKEY *key, *prev_key, **next_key; DWORD dwFileSize; - - DPRINT("%p\n", hFile); - + + TRACE("%p\n", hFile); + dwFileSize = GetFileSize(hFile, NULL); if (dwFileSize == INVALID_FILE_SIZE || dwFileSize == 0) return NULL; @@ -319,7 +329,7 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding) if (!ReadFile(hFile, buffer_base, dwFileSize, &dwFileSize, NULL)) { HeapFree(GetProcessHeap(), 0, buffer_base); - DPRINT("Error %ld reading file\n", GetLastError()); + WARN("Error %d reading file\n", GetLastError()); return NULL; } len = dwFileSize; @@ -331,7 +341,7 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding) switch (*pEncoding) { case ENCODING_ANSI: - DPRINT("ANSI encoding\n"); + TRACE("ANSI encoding\n"); len = MultiByteToWideChar(CP_ACP, 0, pBuffer, dwFileSize, NULL, 0); szFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); @@ -344,7 +354,7 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding) szEnd = szFile + len; break; case ENCODING_UTF8: - DPRINT("UTF8 encoding\n"); + TRACE("UTF8 encoding\n"); len = MultiByteToWideChar(CP_UTF8, 0, pBuffer, dwFileSize, NULL, 0); szFile = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); @@ -357,18 +367,18 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding) szEnd = szFile + len; break; case ENCODING_UTF16LE: - DPRINT("UTF16 Little Endian encoding\n"); + TRACE("UTF16 Little Endian encoding\n"); szFile = pBuffer; szEnd = (WCHAR *)((char *)pBuffer + dwFileSize); break; case ENCODING_UTF16BE: - DPRINT("UTF16 Big Endian encoding\n"); + TRACE("UTF16 Big Endian encoding\n"); szFile = pBuffer; szEnd = (WCHAR *)((char *)pBuffer + dwFileSize); PROFILE_ByteSwapShortBuffer(szFile, dwFileSize / sizeof(WCHAR)); break; default: - DPRINT("encoding type %d not implemented\n", *pEncoding); + FIXME("encoding type %d not implemented\n", *pEncoding); HeapFree(GetProcessHeap(), 0, buffer_base); return NULL; } @@ -411,8 +421,8 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding) const WCHAR * szSectionEnd; if (!(szSectionEnd = memrchrW( szLineStart, ']', szLineEnd - szLineStart ))) { - DPRINT("Invalid section header at line %d: %.*S\n", - line, (int)(szLineEnd - szLineStart), szLineStart); + WARN("Invalid section header at line %d: %s\n", + line, debugstr_wn(szLineStart, (int)(szLineEnd - szLineStart)) ); } else { @@ -431,7 +441,7 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding) next_key = §ion->key; prev_key = NULL; - DPRINT("New section: %S\n", section->name); + TRACE("New section: %s\n", debugstr_w(section->name)); continue; } @@ -460,7 +470,6 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding) { len = (int)(szLineEnd - szValueStart); key->value = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ); - if (!key->value) break; memcpy(key->value, szValueStart, len * sizeof(WCHAR)); key->value[len] = '\0'; } @@ -471,8 +480,8 @@ static PROFILESECTION *PROFILE_Load(HANDLE hFile, ENCODING * pEncoding) next_key = &key->next; prev_key = key; - DPRINT("New key: name=%S, value=%S\n", - key->name, key->value ?key->value : L"(none)"); + TRACE("New key: name=%s, value=%s\n", + debugstr_w(key->name), key->value ? debugstr_w(key->value) : "(none)"); } } if (szFile != pBuffer) @@ -491,7 +500,7 @@ static BOOL PROFILE_DeleteSection( PROFILESECTION **section, LPCWSTR name ) { while (*section) { - if ((*section)->name[0] && !_wcsicmp( (*section)->name, name )) + if ((*section)->name[0] && !strcmpiW( (*section)->name, name )) { PROFILESECTION *to_del = *section; *section = to_del->next; @@ -511,16 +520,16 @@ static BOOL PROFILE_DeleteSection( PROFILESECTION **section, LPCWSTR name ) * Delete a key from a profile tree. */ static BOOL PROFILE_DeleteKey( PROFILESECTION **section, - LPCWSTR section_name, LPCWSTR key_name ) + LPCWSTR section_name, LPCWSTR key_name ) { while (*section) { - if ((*section)->name[0] && !_wcsicmp( (*section)->name, section_name )) + if ((*section)->name[0] && !strcmpiW( (*section)->name, section_name )) { PROFILEKEY **key = &(*section)->key; while (*key) { - if (!_wcsicmp( (*key)->name, key_name )) + if (!strcmpiW( (*key)->name, key_name )) { PROFILEKEY *to_del = *key; *key = to_del->next; @@ -547,16 +556,16 @@ static void PROFILE_DeleteAllKeys( LPCWSTR section_name) PROFILESECTION **section= &CurProfile->section; while (*section) { - if ((*section)->name[0] && !_wcsicmp( (*section)->name, section_name )) + if ((*section)->name[0] && !strcmpiW( (*section)->name, section_name )) { PROFILEKEY **key = &(*section)->key; while (*key) { PROFILEKEY *to_del = *key; - *key = to_del->next; + *key = to_del->next; HeapFree( GetProcessHeap(), 0, to_del->value); - HeapFree( GetProcessHeap(), 0, to_del ); - CurProfile->changed =TRUE; + HeapFree( GetProcessHeap(), 0, to_del ); + CurProfile->changed =TRUE; } } section = &(*section)->next; @@ -577,7 +586,7 @@ static PROFILEKEY *PROFILE_Find( PROFILESECTION **section, LPCWSTR section_name, while (PROFILE_isspaceW(*section_name)) section_name++; if (*section_name) - p = section_name + wcslen(section_name) - 1; + p = section_name + strlenW(section_name) - 1; else p = section_name; @@ -586,7 +595,7 @@ static PROFILEKEY *PROFILE_Find( PROFILESECTION **section, LPCWSTR section_name, while (PROFILE_isspaceW(*key_name)) key_name++; if (*key_name) - p = key_name + wcslen(key_name) - 1; + p = key_name + strlenW(key_name) - 1; else p = key_name; @@ -596,7 +605,7 @@ static PROFILEKEY *PROFILE_Find( PROFILESECTION **section, LPCWSTR section_name, while (*section) { if ( ((*section)->name[0]) - && (!(_wcsnicmp( (*section)->name, section_name, seclen ))) + && (!(strncmpiW( (*section)->name, section_name, seclen ))) && (((*section)->name)[seclen] == '\0') ) { PROFILEKEY **key = &(*section)->key; @@ -610,17 +619,16 @@ static PROFILEKEY *PROFILE_Find( PROFILESECTION **section, LPCWSTR section_name, */ if(!create_always) { - if ( (!(_wcsnicmp( (*key)->name, key_name, keylen ))) + if ( (!(strncmpiW( (*key)->name, key_name, keylen ))) && (((*key)->name)[keylen] == '\0') ) return *key; } key = &(*key)->next; } - if (!create) + if (!create) return NULL; + if (!(*key = HeapAlloc( GetProcessHeap(), 0, sizeof(PROFILEKEY) + strlenW(key_name) * sizeof(WCHAR) ))) return NULL; - if (!(*key = HeapAlloc( GetProcessHeap(), 0, sizeof(PROFILEKEY) + wcslen(key_name) * sizeof(WCHAR) ))) - return NULL; - wcscpy( (*key)->name, key_name ); + strcpyW( (*key)->name, key_name ); (*key)->value = NULL; (*key)->next = NULL; return *key; @@ -628,17 +636,17 @@ static PROFILEKEY *PROFILE_Find( PROFILESECTION **section, LPCWSTR section_name, section = &(*section)->next; } if (!create) return NULL; - *section = HeapAlloc( GetProcessHeap(), 0, sizeof(PROFILESECTION) + wcslen(section_name) * sizeof(WCHAR) ); + *section = HeapAlloc( GetProcessHeap(), 0, sizeof(PROFILESECTION) + strlenW(section_name) * sizeof(WCHAR) ); if(*section == NULL) return NULL; - wcscpy( (*section)->name, section_name ); + strcpyW( (*section)->name, section_name ); (*section)->next = NULL; if (!((*section)->key = HeapAlloc( GetProcessHeap(), 0, - sizeof(PROFILEKEY) + wcslen(key_name) * sizeof(WCHAR) ))) + sizeof(PROFILEKEY) + strlenW(key_name) * sizeof(WCHAR) ))) { HeapFree(GetProcessHeap(), 0, *section); return NULL; } - wcscpy( (*section)->key->name, key_name ); + strcpyW( (*section)->key->name, key_name ); (*section)->key->value = NULL; (*section)->key->next = NULL; return (*section)->key; @@ -657,7 +665,7 @@ static BOOL PROFILE_FlushFile(void) if(!CurProfile) { - DPRINT("No current profile!\n"); + WARN("No current profile!\n"); return FALSE; } @@ -668,11 +676,11 @@ static BOOL PROFILE_FlushFile(void) if (hFile == INVALID_HANDLE_VALUE) { - DPRINT("could not save profile file %S (error was %ld)\n", CurProfile->filename, GetLastError()); + WARN("could not save profile file %s (error was %d)\n", debugstr_w(CurProfile->filename), GetLastError()); return FALSE; } - DPRINT("Saving %S\n", CurProfile->filename); + TRACE("Saving %s\n", debugstr_w(CurProfile->filename)); PROFILE_Save( hFile, CurProfile->section, CurProfile->encoding ); if(GetFileTime(hFile, NULL, NULL, &LastWriteTime)) CurProfile->LastWriteTime=LastWriteTime; @@ -715,7 +723,7 @@ static BOOL is_not_current(FILETIME * ft) GetSystemTimeAsFileTime(&Now); ftll = ((LONGLONG)ft->dwHighDateTime << 32) + ft->dwLowDateTime; nowll = ((LONGLONG)Now.dwHighDateTime << 32) + Now.dwLowDateTime; - DPRINT("%08x;%08x\n",(unsigned)ftll+21000000,(unsigned)nowll); + TRACE("%08x;%08x\n",(unsigned)ftll+21000000,(unsigned)nowll); return ftll + 21000000 < nowll; } @@ -726,13 +734,12 @@ static BOOL is_not_current(FILETIME * ft) */ static BOOL PROFILE_Open( LPCWSTR filename, BOOL write_access ) { - WCHAR windirW[MAX_PATH]; WCHAR buffer[MAX_PATH]; HANDLE hFile = INVALID_HANDLE_VALUE; FILETIME LastWriteTime; int i,j; PROFILE *tempProfile; - + ZeroMemory(&LastWriteTime, sizeof(LastWriteTime)); /* First time around */ @@ -749,26 +756,26 @@ static BOOL PROFILE_Open( LPCWSTR filename, BOOL write_access ) ZeroMemory(&MRUProfile[i]->LastWriteTime, sizeof(FILETIME)); } - GetWindowsDirectoryW( windirW, MAX_PATH ); - if (!filename) - filename = wininiW; + filename = wininiW; - if ((RtlDetermineDosPathNameType_U(filename) == RtlPathTypeRelative) && - !wcschr(filename, '\\') && !wcschr(filename, '/')) + if ((RtlDetermineDosPathNameType_U(filename) == RELATIVE_PATH) && + !strchrW(filename, '\\') && !strchrW(filename, '/')) { static const WCHAR wszSeparator[] = {'\\', 0}; - wcscpy(buffer, windirW); - wcscat(buffer, wszSeparator); - wcscat(buffer, filename); + WCHAR windirW[MAX_PATH]; + GetWindowsDirectoryW( windirW, MAX_PATH ); + strcpyW(buffer, windirW); + strcatW(buffer, wszSeparator); + strcatW(buffer, filename); } else { LPWSTR dummy; GetFullPathNameW(filename, sizeof(buffer)/sizeof(buffer[0]), buffer, &dummy); } - - DPRINT("path: %S\n", buffer); + + TRACE("path: %s\n", debugstr_w(buffer)); hFile = CreateFileW(buffer, GENERIC_READ | (write_access ? GENERIC_WRITE : 0), FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, @@ -776,65 +783,63 @@ static BOOL PROFILE_Open( LPCWSTR filename, BOOL write_access ) if ((hFile == INVALID_HANDLE_VALUE) && (GetLastError() != ERROR_FILE_NOT_FOUND)) { - DPRINT("Error %ld opening file %S\n", GetLastError(), buffer); + WARN("Error %d opening file %s\n", GetLastError(), debugstr_w(buffer)); return FALSE; } - for(i = 0; i < N_CACHED_PROFILES; i++) + for(i=0;ifilename && !wcscmp( buffer, MRUProfile[i]->filename ))) - { - DPRINT("MRU Filename: %S, new filename: %S\n", MRUProfile[i]->filename, buffer); - if(i) - { - PROFILE_FlushFile(); - tempProfile=MRUProfile[i]; - for (j = i; j > 0; j--) - MRUProfile[j] = MRUProfile[j-1]; - CurProfile=tempProfile; - } - if (hFile != INVALID_HANDLE_VALUE) - { - GetFileTime(hFile, NULL, NULL, &LastWriteTime); - if (!memcmp( &CurProfile->LastWriteTime, &LastWriteTime, sizeof(FILETIME) ) && - is_not_current(&LastWriteTime)) - DPRINT("(%S): already opened (mru=%d)\n", buffer, i); - else - { - DPRINT("(%S): already opened, needs refreshing (mru=%d)\n", buffer, i); - PROFILE_Free(CurProfile->section); - CurProfile->section = PROFILE_Load(hFile, &CurProfile->encoding); - CurProfile->LastWriteTime = LastWriteTime; - } - CloseHandle(hFile); - } - else DPRINT("(%S): already opened (mru = %d)\n", buffer, i ); + if ((MRUProfile[i]->filename && !strcmpiW( buffer, MRUProfile[i]->filename ))) + { + TRACE("MRU Filename: %s, new filename: %s\n", debugstr_w(MRUProfile[i]->filename), debugstr_w(buffer)); + if(i) + { + PROFILE_FlushFile(); + tempProfile=MRUProfile[i]; + for(j=i;j>0;j--) + MRUProfile[j]=MRUProfile[j-1]; + CurProfile=tempProfile; + } - return TRUE; - } + if (hFile != INVALID_HANDLE_VALUE) + { + GetFileTime(hFile, NULL, NULL, &LastWriteTime); + if (!memcmp( &CurProfile->LastWriteTime, &LastWriteTime, sizeof(FILETIME) ) && + is_not_current(&LastWriteTime)) + TRACE("(%s): already opened (mru=%d)\n", + debugstr_w(buffer), i); + else + { + TRACE("(%s): already opened, needs refreshing (mru=%d)\n", + debugstr_w(buffer), i); + PROFILE_Free(CurProfile->section); + CurProfile->section = PROFILE_Load(hFile, &CurProfile->encoding); + CurProfile->LastWriteTime = LastWriteTime; + } + CloseHandle(hFile); + } + else TRACE("(%s): already opened, not yet created (mru=%d)\n", + debugstr_w(buffer), i); + return TRUE; + } } /* Flush the old current profile */ PROFILE_FlushFile(); /* Make the oldest profile the current one only in order to get rid of it */ - if(i == N_CACHED_PROFILES) + if(i==N_CACHED_PROFILES) { - tempProfile = MRUProfile[N_CACHED_PROFILES-1]; - for (i = N_CACHED_PROFILES - 1; i > 0; i--) - MRUProfile[i] = MRUProfile[i-1]; + tempProfile=MRUProfile[N_CACHED_PROFILES-1]; + for(i=N_CACHED_PROFILES-1;i>0;i--) + MRUProfile[i]=MRUProfile[i-1]; CurProfile=tempProfile; } if(CurProfile->filename) PROFILE_ReleaseFile(); /* OK, now that CurProfile is definitely free we assign it our new file */ - CurProfile->filename = HeapAlloc( GetProcessHeap(), 0, (wcslen(buffer)+1) * sizeof(WCHAR) ); - if(CurProfile->filename == NULL) - { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } - wcscpy( CurProfile->filename, buffer ); + CurProfile->filename = HeapAlloc( GetProcessHeap(), 0, (strlenW(buffer)+1) * sizeof(WCHAR) ); + strcpyW( CurProfile->filename, buffer ); if (hFile != INVALID_HANDLE_VALUE) { @@ -845,7 +850,7 @@ static BOOL PROFILE_Open( LPCWSTR filename, BOOL write_access ) else { /* Does not exist yet, we will create it in PROFILE_FlushFile */ - DPRINT("profile file %S not found\n", buffer); + WARN("profile file %s not found\n", debugstr_w(buffer) ); } return TRUE; } @@ -858,17 +863,17 @@ static BOOL PROFILE_Open( LPCWSTR filename, BOOL write_access ) * If return_values is TRUE, also include the corresponding values. */ static INT PROFILE_GetSection( PROFILESECTION *section, LPCWSTR section_name, - LPWSTR buffer, UINT len, BOOL return_values ) + LPWSTR buffer, DWORD len, BOOL return_values ) { PROFILEKEY *key; if(!buffer) return 0; - DPRINT("%S,%p,%u\n", section_name, buffer, len); + TRACE("%s,%p,%u\n", debugstr_w(section_name), buffer, len); while (section) { - if (section->name[0] && !_wcsicmp( section->name, section_name )) + if (section->name[0] && !strcmpiW( section->name, section_name )) { UINT oldlen = len; for (key = section->key; key; key = key->next) @@ -878,27 +883,26 @@ static INT PROFILE_GetSection( PROFILESECTION *section, LPCWSTR section_name, if (IS_ENTRY_COMMENT(key->name)) continue; /* Skip comments */ if (!return_values && !key->value) continue; /* Skip lines w.o. '=' */ PROFILE_CopyEntry( buffer, key->name, len - 1, 0 ); - len -= wcslen(buffer) + 1; - buffer += wcslen(buffer) + 1; - if (len < 2) - break; - if (return_values && key->value) - { - buffer[-1] = '='; - PROFILE_CopyEntry ( buffer, key->value, len - 1, 0 ); - len -= wcslen(buffer) + 1; - buffer += wcslen(buffer) + 1; + len -= strlenW(buffer) + 1; + buffer += strlenW(buffer) + 1; + if (len < 2) + break; + if (return_values && key->value) { + buffer[-1] = '='; + PROFILE_CopyEntry ( buffer, key->value, len - 1, 0 ); + len -= strlenW(buffer) + 1; + buffer += strlenW(buffer) + 1; } } *buffer = '\0'; if (len <= 1) - { /*If either lpszSection or lpszKey is NULL and the supplied destination buffer is too small to hold all the strings, the last string is truncated and followed by two null characters. In this case, the return value is equal to cchReturnBuffer minus two. */ - buffer[-1] = '\0'; + { + buffer[-1] = '\0'; return oldlen - 2; } return oldlen - len; @@ -910,35 +914,35 @@ static INT PROFILE_GetSection( PROFILESECTION *section, LPCWSTR section_name, } /* See GetPrivateProfileSectionNamesA for documentation */ -static INT PROFILE_GetSectionNames( LPWSTR buffer, UINT len ) +static INT PROFILE_GetSectionNames( LPWSTR buffer, DWORD len ) { LPWSTR buf; UINT buflen,tmplen; PROFILESECTION *section; - DPRINT("(%p, %d)\n", buffer, len); + TRACE("(%p, %d)\n", buffer, len); if (!buffer || !len) return 0; - if (len == 1) { - *buffer = '\0'; + if (len==1) { + *buffer='\0'; return 0; } buflen=len-1; - buf = buffer; + buf=buffer; section = CurProfile->section; while ((section!=NULL)) { if (section->name[0]) { - tmplen = wcslen(section->name)+1; + tmplen = strlenW(section->name)+1; if (tmplen >= buflen) { if (buflen > 0) { - memcpy(buf, section->name, (buflen - 1) * sizeof(WCHAR)); - buf += buflen - 1; - *buf++ = '\0'; + memcpy(buf, section->name, (buflen-1) * sizeof(WCHAR)); + buf += buflen-1; + *buf++='\0'; } *buf='\0'; - return len - 2; + return len-2; } memcpy(buf, section->name, tmplen * sizeof(WCHAR)); buf += tmplen; @@ -946,8 +950,8 @@ static INT PROFILE_GetSectionNames( LPWSTR buffer, UINT len ) } section = section->next; } - *buf = '\0'; - return buf - buffer; + *buf='\0'; + return buf-buffer; } @@ -958,46 +962,45 @@ static INT PROFILE_GetSectionNames( LPWSTR buffer, UINT len ) * * Tests with GetPrivateProfileString16, W95a, * with filled buffer ("****...") and section "set1" and key_name "1" valid: - * section key_name def_val res buffer - * "set1" "1" "x" 43 [data] - * "set1" "1 " "x" 43 [data] (!) - * "set1" " 1 "' "x" 43 [data] (!) - * "set1" "" "x" 1 "x" - * "set1" "" "x " 1 "x" (!) - * "set1" "" " x " 3 " x" (!) - * "set1" NULL "x" 6 "1\02\03\0\0" - * "set1" "" "x" 1 "x" - * NULL "1" "x" 0 "" (!) - * "" "1" "x" 1 "x" - * NULL NULL "" 0 "" + * section key_name def_val res buffer + * "set1" "1" "x" 43 [data] + * "set1" "1 " "x" 43 [data] (!) + * "set1" " 1 "' "x" 43 [data] (!) + * "set1" "" "x" 1 "x" + * "set1" "" "x " 1 "x" (!) + * "set1" "" " x " 3 " x" (!) + * "set1" NULL "x" 6 "1\02\03\0\0" + * "set1" "" "x" 1 "x" + * NULL "1" "x" 0 "" (!) + * "" "1" "x" 1 "x" + * NULL NULL "" 0 "" * * */ static INT PROFILE_GetString( LPCWSTR section, LPCWSTR key_name, - LPCWSTR def_val, LPWSTR buffer, UINT len ) + LPCWSTR def_val, LPWSTR buffer, DWORD len ) { PROFILEKEY *key = NULL; static const WCHAR empty_strW[] = { 0 }; - if (!buffer || !len) return 0; + if(!buffer || !len) return 0; if (!def_val) def_val = empty_strW; if (key_name) { - if (!key_name[0]) + if (!key_name[0]) { PROFILE_CopyEntry(buffer, def_val, len, TRUE); - return wcslen(buffer); + return strlenW(buffer); } key = PROFILE_Find( &CurProfile->section, section, key_name, FALSE, FALSE); PROFILE_CopyEntry( buffer, (key && key->value) ? key->value : def_val, len, TRUE ); - DPRINT("(%S, %S, %S): returning %S\n", - section, key_name, - def_val, buffer); - return wcslen(buffer); + TRACE("(%s,%s,%s): returning %s\n", + debugstr_w(section), debugstr_w(key_name), + debugstr_w(def_val), debugstr_w(buffer) ); + return strlenW( buffer ); } - /* no "else" here ! */ if (section && section[0]) { @@ -1005,7 +1008,7 @@ static INT PROFILE_GetString( LPCWSTR section, LPCWSTR key_name, if (!buffer[0]) /* no luck -> def_val */ { PROFILE_CopyEntry(buffer, def_val, len, TRUE); - ret = wcslen(buffer); + ret = strlenW(buffer); } return ret; } @@ -1024,7 +1027,7 @@ static BOOL PROFILE_SetString( LPCWSTR section_name, LPCWSTR key_name, { if (!key_name) /* Delete a whole section */ { - DPRINT("(%S)\n", section_name); + TRACE("(%s)\n", debugstr_w(section_name)); CurProfile->changed |= PROFILE_DeleteSection( &CurProfile->section, section_name ); return TRUE; /* Even if PROFILE_DeleteSection() has failed, @@ -1032,7 +1035,7 @@ static BOOL PROFILE_SetString( LPCWSTR section_name, LPCWSTR key_name, } else if (!value) /* Delete a key */ { - DPRINT("(%S, %S)\n", section_name, key_name); + TRACE("(%s,%s)\n", debugstr_w(section_name), debugstr_w(key_name) ); CurProfile->changed |= PROFILE_DeleteKey( &CurProfile->section, section_name, key_name ); return TRUE; /* same error handling as above */ @@ -1041,35 +1044,27 @@ static BOOL PROFILE_SetString( LPCWSTR section_name, LPCWSTR key_name, { PROFILEKEY *key = PROFILE_Find(&CurProfile->section, section_name, key_name, TRUE, create_always ); - DPRINT("(%S, %S, %S):\n", - section_name, key_name, value); + TRACE("(%s,%s,%s):\n", + debugstr_w(section_name), debugstr_w(key_name), debugstr_w(value) ); if (!key) return FALSE; /* strip the leading spaces. We can safely strip \n\r and * friends too, they should not happen here anyway. */ - while (PROFILE_isspaceW(*value)) value++; + while (PROFILE_isspaceW(*value)) value++; if (key->value) { - if (!wcscmp( key->value, value )) + if (!strcmpW( key->value, value )) { - DPRINT(" no change needed\n" ); + TRACE(" no change needed\n" ); return TRUE; /* No change needed */ } - DPRINT(" replacing %S\n", key->value); + TRACE(" replacing %s\n", debugstr_w(key->value) ); HeapFree( GetProcessHeap(), 0, key->value ); } - else - { - DPRINT(" creating key\n"); - } - key->value = HeapAlloc( GetProcessHeap(), 0, (wcslen(value) + 1) * sizeof(WCHAR) ); - if(key->value == NULL) - { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } - wcscpy( key->value, value ); + else TRACE(" creating key\n" ); + key->value = HeapAlloc( GetProcessHeap(), 0, (strlenW(value)+1) * sizeof(WCHAR) ); + strcpyW( key->value, value ); CurProfile->changed = TRUE; } return TRUE; @@ -1092,26 +1087,26 @@ UINT WINAPI GetProfileIntA( LPCSTR section, LPCSTR entry, INT def_val ) */ UINT WINAPI GetProfileIntW( LPCWSTR section, LPCWSTR entry, INT def_val ) { - return GetPrivateProfileIntW( section, entry, def_val, L"win.ini" ); + return GetPrivateProfileIntW( section, entry, def_val, wininiW ); } /*********************************************************************** * GetPrivateProfileStringW (KERNEL32.@) */ DWORD WINAPI GetPrivateProfileStringW( LPCWSTR section, LPCWSTR entry, - LPCWSTR def_val, LPWSTR buffer, - DWORD len, LPCWSTR filename ) + LPCWSTR def_val, LPWSTR buffer, + DWORD len, LPCWSTR filename ) { - int ret; - LPWSTR defval_tmp = NULL; + int ret; + LPWSTR defval_tmp = NULL; - DPRINT("%S, %S, %S, %p, %u, %S\n", - section, entry, def_val, buffer, len, filename); + TRACE("%s,%s,%s,%p,%u,%s\n", debugstr_w(section), debugstr_w(entry), + debugstr_w(def_val), buffer, len, debugstr_w(filename)); /* strip any trailing ' ' of def_val. */ if (def_val) { - LPCWSTR p = def_val + wcslen(def_val) - 1; + LPCWSTR p = def_val + strlenW(def_val) - 1; while (p > def_val && *p == ' ') p--; @@ -1121,7 +1116,6 @@ DWORD WINAPI GetPrivateProfileStringW( LPCWSTR section, LPCWSTR entry, int len = (int)(p - def_val) + 1; defval_tmp = HeapAlloc(GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR)); - if (!defval_tmp) return 0; memcpy(defval_tmp, def_val, len * sizeof(WCHAR)); defval_tmp[len] = '\0'; def_val = defval_tmp; @@ -1131,14 +1125,14 @@ DWORD WINAPI GetPrivateProfileStringW( LPCWSTR section, LPCWSTR entry, RtlEnterCriticalSection( &PROFILE_CritSect ); if (PROFILE_Open( filename, FALSE )) { - if (section == NULL) + if (section == NULL) ret = PROFILE_GetSectionNames(buffer, len); - else - /* PROFILE_GetString can handle the 'entry == NULL' case */ + else + /* PROFILE_GetString can handle the 'entry == NULL' case */ ret = PROFILE_GetString( section, entry, def_val, buffer, len ); } else if (buffer && def_val) { lstrcpynW( buffer, def_val, len ); - ret = wcslen( buffer ); + ret = strlenW( buffer ); } else ret = 0; @@ -1147,7 +1141,7 @@ DWORD WINAPI GetPrivateProfileStringW( LPCWSTR section, LPCWSTR entry, HeapFree(GetProcessHeap(), 0, defval_tmp); - DPRINT("returning %S, %d\n", buffer, ret); + TRACE("returning %s, %d\n", debugstr_w(buffer), ret); return ret; } @@ -1156,8 +1150,8 @@ DWORD WINAPI GetPrivateProfileStringW( LPCWSTR section, LPCWSTR entry, * GetPrivateProfileStringA (KERNEL32.@) */ DWORD WINAPI GetPrivateProfileStringA( LPCSTR section, LPCSTR entry, - LPCSTR def_val, LPSTR buffer, - DWORD len, LPCSTR filename ) + LPCSTR def_val, LPSTR buffer, + DWORD len, LPCSTR filename ) { UNICODE_STRING sectionW, entryW, def_valW, filenameW; LPWSTR bufferW; @@ -1176,7 +1170,7 @@ DWORD WINAPI GetPrivateProfileStringA( LPCSTR section, LPCSTR entry, retW = GetPrivateProfileStringW( sectionW.Buffer, entryW.Buffer, def_valW.Buffer, bufferW, len, filenameW.Buffer); - if (len) + if (len && buffer) { if (retW) { @@ -1199,7 +1193,7 @@ DWORD WINAPI GetPrivateProfileStringA( LPCSTR section, LPCSTR entry, * GetProfileStringA (KERNEL32.@) */ DWORD WINAPI GetProfileStringA( LPCSTR section, LPCSTR entry, LPCSTR def_val, - LPSTR buffer, DWORD len ) + LPSTR buffer, DWORD len ) { return GetPrivateProfileStringA( section, entry, def_val, buffer, len, "win.ini" ); @@ -1209,17 +1203,17 @@ DWORD WINAPI GetProfileStringA( LPCSTR section, LPCSTR entry, LPCSTR def_val, * GetProfileStringW (KERNEL32.@) */ DWORD WINAPI GetProfileStringW( LPCWSTR section, LPCWSTR entry, - LPCWSTR def_val, LPWSTR buffer, DWORD len ) + LPCWSTR def_val, LPWSTR buffer, DWORD len ) { return GetPrivateProfileStringW( section, entry, def_val, - buffer, len, L"win.ini" ); + buffer, len, wininiW ); } /*********************************************************************** * WriteProfileStringA (KERNEL32.@) */ BOOL WINAPI WriteProfileStringA( LPCSTR section, LPCSTR entry, - LPCSTR string ) + LPCSTR string ) { return WritePrivateProfileStringA( section, entry, string, "win.ini" ); } @@ -1230,7 +1224,7 @@ BOOL WINAPI WriteProfileStringA( LPCSTR section, LPCSTR entry, BOOL WINAPI WriteProfileStringW( LPCWSTR section, LPCWSTR entry, LPCWSTR string ) { - return WritePrivateProfileStringW( section, entry, string, L"win.ini" ); + return WritePrivateProfileStringW( section, entry, string, wininiW ); } @@ -1268,7 +1262,7 @@ UINT WINAPI GetPrivateProfileIntW( LPCWSTR section, LPCWSTR entry, * FIXME: rewrite using unicode */ UINT WINAPI GetPrivateProfileIntA( LPCSTR section, LPCSTR entry, - INT def_val, LPCSTR filename ) + INT def_val, LPCSTR filename ) { UNICODE_STRING entryW, filenameW, sectionW; UINT res; @@ -1290,7 +1284,7 @@ UINT WINAPI GetPrivateProfileIntA( LPCSTR section, LPCSTR entry, * GetPrivateProfileSectionW (KERNEL32.@) */ DWORD WINAPI GetPrivateProfileSectionW( LPCWSTR section, LPWSTR buffer, - DWORD len, LPCWSTR filename ) + DWORD len, LPCWSTR filename ) { int ret = 0; @@ -1300,7 +1294,7 @@ DWORD WINAPI GetPrivateProfileSectionW( LPCWSTR section, LPWSTR buffer, return 0; } - DPRINT("(%S, %p, %ld, %S)\n", section, buffer, len, filename); + TRACE("(%s, %p, %d, %s)\n", debugstr_w(section), buffer, len, debugstr_w(filename)); RtlEnterCriticalSection( &PROFILE_CritSect ); @@ -1329,12 +1323,6 @@ DWORD WINAPI GetPrivateProfileSectionA( LPCSTR section, LPSTR buffer, } bufferW = HeapAlloc(GetProcessHeap(), 0, len * 2 * sizeof(WCHAR)); - if (!bufferW) - { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return 0; - } - RtlCreateUnicodeStringFromAsciiz(§ionW, section); if (filename) RtlCreateUnicodeStringFromAsciiz(&filenameW, filename); else filenameW.Buffer = NULL; @@ -1377,7 +1365,7 @@ DWORD WINAPI GetProfileSectionA( LPCSTR section, LPSTR buffer, DWORD len ) */ DWORD WINAPI GetProfileSectionW( LPCWSTR section, LPWSTR buffer, DWORD len ) { - return GetPrivateProfileSectionW( section, buffer, len, L"win.ini" ); + return GetPrivateProfileSectionW( section, buffer, len, wininiW ); } @@ -1385,7 +1373,7 @@ DWORD WINAPI GetProfileSectionW( LPCWSTR section, LPWSTR buffer, DWORD len ) * WritePrivateProfileStringW (KERNEL32.@) */ BOOL WINAPI WritePrivateProfileStringW( LPCWSTR section, LPCWSTR entry, - LPCWSTR string, LPCWSTR filename ) + LPCWSTR string, LPCWSTR filename ) { BOOL ret = FALSE; @@ -1416,7 +1404,7 @@ BOOL WINAPI WritePrivateProfileStringW( LPCWSTR section, LPCWSTR entry, * WritePrivateProfileStringA (KERNEL32.@) */ BOOL WINAPI WritePrivateProfileStringA( LPCSTR section, LPCSTR entry, - LPCSTR string, LPCSTR filename ) + LPCSTR string, LPCSTR filename ) { UNICODE_STRING sectionW, entryW, stringW, filenameW; BOOL ret; @@ -1459,26 +1447,20 @@ BOOL WINAPI WritePrivateProfileSectionW( LPCWSTR section, } else if (PROFILE_Open( filename, TRUE )) { if (!string) {/* delete the named section*/ - ret = PROFILE_SetString(section,NULL,NULL, FALSE); - PROFILE_FlushFile(); + ret = PROFILE_SetString(section,NULL,NULL, FALSE); + PROFILE_FlushFile(); } else { - PROFILE_DeleteAllKeys(section); - ret = TRUE; + PROFILE_DeleteAllKeys(section); + ret = TRUE; while(*string) { - LPWSTR buf = HeapAlloc( GetProcessHeap(), 0, (wcslen(string)+1) * sizeof(WCHAR) ); - if(buf == NULL) - { - RtlLeaveCriticalSection( &PROFILE_CritSect ); - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } - wcscpy( buf, string ); - if((p = wcschr( buf, '='))) { - *p = '\0'; - ret = PROFILE_SetString( section, buf, p + 1, TRUE); + LPWSTR buf = HeapAlloc( GetProcessHeap(), 0, (strlenW(string)+1) * sizeof(WCHAR) ); + strcpyW( buf, string ); + if((p = strchrW( buf, '='))) { + *p='\0'; + ret = PROFILE_SetString( section, buf, p+1, TRUE); } HeapFree( GetProcessHeap(), 0, buf ); - string += wcslen(string) + 1; + string += strlenW(string)+1; } PROFILE_FlushFile(); } @@ -1530,7 +1512,7 @@ BOOL WINAPI WritePrivateProfileSectionA( LPCSTR section, BOOL WINAPI WriteProfileSectionA( LPCSTR section, LPCSTR keys_n_values) { - return WritePrivateProfileSectionA(section, keys_n_values, "win.ini"); + return WritePrivateProfileSectionA( section, keys_n_values, "win.ini"); } /*********************************************************************** @@ -1580,7 +1562,7 @@ BOOL WINAPI WriteProfileSectionW( LPCWSTR section, LPCWSTR keys_n_values) * value between 1 and len-1 (or len in Win95), including len-2. */ DWORD WINAPI GetPrivateProfileSectionNamesW( LPWSTR buffer, DWORD size, - LPCWSTR filename) + LPCWSTR filename) { DWORD ret = 0; @@ -1599,7 +1581,7 @@ DWORD WINAPI GetPrivateProfileSectionNamesW( LPWSTR buffer, DWORD size, * GetPrivateProfileSectionNamesA (KERNEL32.@) */ DWORD WINAPI GetPrivateProfileSectionNamesA( LPSTR buffer, DWORD size, - LPCSTR filename) + LPCSTR filename) { UNICODE_STRING filenameW; LPWSTR bufferW; @@ -1637,71 +1619,67 @@ DWORD WINAPI GetPrivateProfileSectionNamesA( LPSTR buffer, DWORD size, BOOL WINAPI GetPrivateProfileStructW (LPCWSTR section, LPCWSTR key, LPVOID buf, UINT len, LPCWSTR filename) { - BOOL ret = FALSE; + BOOL ret = FALSE; RtlEnterCriticalSection( &PROFILE_CritSect ); - if (PROFILE_Open( filename, FALSE )) - { + if (PROFILE_Open( filename, FALSE )) { PROFILEKEY *k = PROFILE_Find ( &CurProfile->section, section, key, FALSE, FALSE); - if (k) - { - DPRINT("value (at %p): %S\n", k->value, k->value); - if (((wcslen(k->value) - 2) / 2) == len) - { - LPWSTR end, p; - BOOL valid = TRUE; - WCHAR c; - DWORD chksum = 0; + if (k) { + TRACE("value (at %p): %s\n", k->value, debugstr_w(k->value)); + if (((strlenW(k->value) - 2) / 2) == len) + { + LPWSTR end, p; + BOOL valid = TRUE; + WCHAR c; + DWORD chksum = 0; - end = k->value + wcslen(k->value); /* -> '\0' */ - - /* check for invalid chars in ASCII coded hex string */ - for (p = k->value; p < end; p++) - { - if (!isxdigit(*p)) - { - DPRINT("invalid char '%x' in file %S->[%S]->%S !\n", - *p, filename, section, key); - valid = FALSE; - break; - } - } - - if (valid) - { - BOOL highnibble = TRUE; - BYTE b = 0, val; + end = k->value + strlenW(k->value); /* -> '\0' */ + /* check for invalid chars in ASCII coded hex string */ + for (p=k->value; p < end; p++) + { + if (!isxdigitW(*p)) + { + WARN("invalid char '%x' in file %s->[%s]->%s !\n", + *p, debugstr_w(filename), debugstr_w(section), debugstr_w(key)); + valid = FALSE; + break; + } + } + if (valid) + { + BOOL highnibble = TRUE; + BYTE b = 0, val; LPBYTE binbuf = buf; - end -= 2; /* don't include checksum in output data */ - /* translate ASCII hex format into binary data */ - for (p = k->value; p < end; p++) - { - c = towupper(*p); - val = (c > '9') ? (c - 'A' + 10) : (c - '0'); + end -= 2; /* don't include checksum in output data */ + /* translate ASCII hex format into binary data */ + for (p=k->value; p < end; p++) + { + c = toupperW(*p); + val = (c > '9') ? + (c - 'A' + 10) : (c - '0'); - if (highnibble) - b = val << 4; - else - { - b += val; - *binbuf++ = b; /* feed binary data into output */ - chksum += b; /* calculate checksum */ - } - highnibble ^= 1; /* toggle */ - } - - /* retrieve stored checksum value */ - c = towupper(*p++); - b = ( (c > '9') ? (c - 'A' + 10) : (c - '0') ) << 4; - c = towupper(*p); - b += (c > '9') ? (c - 'A' + 10) : (c - '0'); - if (b == (chksum & 0xff)) /* checksums match ? */ + if (highnibble) + b = val << 4; + else + { + b += val; + *binbuf++ = b; /* feed binary data into output */ + chksum += b; /* calculate checksum */ + } + highnibble ^= 1; /* toggle */ + } + /* retrieve stored checksum value */ + c = toupperW(*p++); + b = ( (c > '9') ? (c - 'A' + 10) : (c - '0') ) << 4; + c = toupperW(*p); + b += (c > '9') ? (c - 'A' + 10) : (c - '0'); + if (b == (chksum & 0xff)) /* checksums match ? */ ret = TRUE; } } - } + } } RtlLeaveCriticalSection( &PROFILE_CritSect ); @@ -1712,7 +1690,7 @@ BOOL WINAPI GetPrivateProfileStructW (LPCWSTR section, LPCWSTR key, * GetPrivateProfileStructA (KERNEL32.@) */ BOOL WINAPI GetPrivateProfileStructA (LPCSTR section, LPCSTR key, - LPVOID buffer, UINT len, LPCSTR filename) + LPVOID buffer, UINT len, LPCSTR filename) { UNICODE_STRING sectionW, keyW, filenameW; INT ret; @@ -1752,17 +1730,11 @@ BOOL WINAPI WritePrivateProfileStructW (LPCWSTR section, LPCWSTR key, /* allocate string buffer for hex chars + checksum hex char + '\0' */ outstring = HeapAlloc( GetProcessHeap(), 0, (bufsize*2 + 2 + 1) * sizeof(WCHAR) ); - if(outstring == NULL) - { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } p = outstring; - for (binbuf = (LPBYTE)buf; binbuf < (LPBYTE)buf+bufsize; binbuf++) - { - *p++ = hex[*binbuf >> 4]; - *p++ = hex[*binbuf & 0xf]; - sum += *binbuf; + for (binbuf = (LPBYTE)buf; binbuf < (LPBYTE)buf+bufsize; binbuf++) { + *p++ = hex[*binbuf >> 4]; + *p++ = hex[*binbuf & 0xf]; + sum += *binbuf; } /* checksum is sum & 0xff */ *p++ = hex[(sum & 0xf0) >> 4]; @@ -1771,8 +1743,7 @@ BOOL WINAPI WritePrivateProfileStructW (LPCWSTR section, LPCWSTR key, RtlEnterCriticalSection( &PROFILE_CritSect ); - if (PROFILE_Open( filename, TRUE )) - { + if (PROFILE_Open( filename, TRUE )) { ret = PROFILE_SetString( section, key, outstring, FALSE); PROFILE_FlushFile(); } @@ -1787,9 +1758,8 @@ BOOL WINAPI WritePrivateProfileStructW (LPCWSTR section, LPCWSTR key, /*********************************************************************** * WritePrivateProfileStructA (KERNEL32.@) */ -BOOL WINAPI -WritePrivateProfileStructA (LPCSTR section, LPCSTR key, - LPVOID buf, UINT bufsize, LPCSTR filename) +BOOL WINAPI WritePrivateProfileStructA (LPCSTR section, LPCSTR key, + LPVOID buf, UINT bufsize, LPCSTR filename) { UNICODE_STRING sectionW, keyW, filenameW; INT ret; @@ -1815,9 +1785,8 @@ WritePrivateProfileStructA (LPCSTR section, LPCSTR key, /*********************************************************************** * OpenProfileUserMapping (KERNEL32.@) */ -BOOL WINAPI OpenProfileUserMapping(VOID) -{ - DPRINT1("(), stub!\n"); +BOOL WINAPI OpenProfileUserMapping(void) { + FIXME("(), stub!\n"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } @@ -1825,24 +1794,8 @@ BOOL WINAPI OpenProfileUserMapping(VOID) /*********************************************************************** * CloseProfileUserMapping (KERNEL32.@) */ -BOOL WINAPI CloseProfileUserMapping(VOID) -{ - DPRINT1("(), stub!\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/* - * @unimplemented - */ -BOOL -WINAPI -QueryWin31IniFilesMappedToRegistry(DWORD Unknown0, - DWORD Unknown1, - DWORD Unknown2, - DWORD Unknown3) -{ - DPRINT1("QueryWin31IniFilesMappedToRegistry not implemented\n"); +BOOL WINAPI CloseProfileUserMapping(void) { + FIXME("(), stub!\n"); SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } diff --git a/reactos/dll/win32/kernel32/client/misc/res.c b/reactos/dll/win32/kernel32/client/misc/res.c index 4844488a0b5..3472d6486ea 100644 --- a/reactos/dll/win32/kernel32/client/misc/res.c +++ b/reactos/dll/win32/kernel32/client/misc/res.c @@ -1,26 +1,589 @@ -/* $Id$ +/* + * Resources * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT : ReactOS user mode libraries - * MODULE : kernel32.dll - * FILE : reactos/lib/kernel32/misc/res.c - * AUTHOR : Ariadne - * Eric Kohl - * Ge van Geldorp - * Gunnar Dalsnes - * David Welch - * Dmitry Chapyshev + * Copyright 1993 Robert J. Amstadt + * Copyright 1995, 2003 Alexandre Julliard + * Copyright 2006 Mike McCormack + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include +//#include "config.h" +//#include "wine/port.h" -#define NDEBUG -#include +#include -#define STUB \ - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); \ - DPRINT1("%s() is UNIMPLEMENTED!\n", __FUNCTION__) +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" +#include "winbase.h" +#include "winternl.h" +#include "wine/debug.h" +#include "wine/exception.h" +#include "wine/unicode.h" +#include "wine/list.h" + +WINE_DEFAULT_DEBUG_CHANNEL(resource); + +/* we don't want to include winuser.h just for this */ +#define IS_INTRESOURCE(x) (((ULONG_PTR)(x) >> 16) == 0) + +/* retrieve the resource name to pass to the ntdll functions */ +static NTSTATUS get_res_nameA( LPCSTR name, UNICODE_STRING *str ) +{ + if (IS_INTRESOURCE(name)) + { + str->Buffer = ULongToPtr(LOWORD(name)); + return STATUS_SUCCESS; + } + if (name[0] == '#') + { + ULONG value; + if (RtlCharToInteger( name + 1, 10, &value ) != STATUS_SUCCESS || HIWORD(value)) + return STATUS_INVALID_PARAMETER; + str->Buffer = ULongToPtr(value); + return STATUS_SUCCESS; + } + RtlCreateUnicodeStringFromAsciiz( str, name ); + RtlUpcaseUnicodeString( str, str, FALSE ); + return STATUS_SUCCESS; +} + +/* retrieve the resource name to pass to the ntdll functions */ +static NTSTATUS get_res_nameW( LPCWSTR name, UNICODE_STRING *str ) +{ + if (IS_INTRESOURCE(name)) + { + str->Buffer = ULongToPtr(LOWORD(name)); + return STATUS_SUCCESS; + } + if (name[0] == '#') + { + ULONG value; + RtlInitUnicodeString( str, name + 1 ); + if (RtlUnicodeStringToInteger( str, 10, &value ) != STATUS_SUCCESS || HIWORD(value)) + return STATUS_INVALID_PARAMETER; + str->Buffer = ULongToPtr(value); + return STATUS_SUCCESS; + } + RtlCreateUnicodeString( str, name ); + RtlUpcaseUnicodeString( str, str, FALSE ); + return STATUS_SUCCESS; +} + +/* implementation of FindResourceExA */ +static HRSRC find_resourceA( HMODULE hModule, LPCSTR type, LPCSTR name, WORD lang ) +{ + NTSTATUS status; + UNICODE_STRING nameW, typeW; + LDR_RESOURCE_INFO info; + const IMAGE_RESOURCE_DATA_ENTRY *entry = NULL; + + nameW.Buffer = NULL; + typeW.Buffer = NULL; + + __TRY + { + if ((status = get_res_nameA( name, &nameW )) != STATUS_SUCCESS) goto done; + if ((status = get_res_nameA( type, &typeW )) != STATUS_SUCCESS) goto done; + info.Type = (ULONG_PTR)typeW.Buffer; + info.Name = (ULONG_PTR)nameW.Buffer; + info.Language = lang; + status = LdrFindResource_U( hModule, &info, 3, &entry ); + done: + if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); + } + __EXCEPT_PAGE_FAULT + { + SetLastError( ERROR_INVALID_PARAMETER ); + } + __ENDTRY + + if (!IS_INTRESOURCE(nameW.Buffer)) HeapFree( GetProcessHeap(), 0, nameW.Buffer ); + if (!IS_INTRESOURCE(typeW.Buffer)) HeapFree( GetProcessHeap(), 0, typeW.Buffer ); + return (HRSRC)entry; +} + + +/* implementation of FindResourceExW */ +static HRSRC find_resourceW( HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD lang ) +{ + NTSTATUS status; + UNICODE_STRING nameW, typeW; + LDR_RESOURCE_INFO info; + const IMAGE_RESOURCE_DATA_ENTRY *entry = NULL; + + nameW.Buffer = typeW.Buffer = NULL; + + __TRY + { + if ((status = get_res_nameW( name, &nameW )) != STATUS_SUCCESS) goto done; + if ((status = get_res_nameW( type, &typeW )) != STATUS_SUCCESS) goto done; + info.Type = (ULONG_PTR)typeW.Buffer; + info.Name = (ULONG_PTR)nameW.Buffer; + info.Language = lang; + status = LdrFindResource_U( hModule, &info, 3, &entry ); + done: + if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); + } + __EXCEPT_PAGE_FAULT + { + SetLastError( ERROR_INVALID_PARAMETER ); + } + __ENDTRY + + if (!IS_INTRESOURCE(nameW.Buffer)) HeapFree( GetProcessHeap(), 0, nameW.Buffer ); + if (!IS_INTRESOURCE(typeW.Buffer)) HeapFree( GetProcessHeap(), 0, typeW.Buffer ); + return (HRSRC)entry; +} + +/********************************************************************** + * FindResourceExA (KERNEL32.@) + */ +HRSRC WINAPI FindResourceExA( HMODULE hModule, LPCSTR type, LPCSTR name, WORD lang ) +{ + TRACE( "%p %s %s %04x\n", hModule, debugstr_a(type), debugstr_a(name), lang ); + + if (!hModule) hModule = GetModuleHandleW(0); + return find_resourceA( hModule, type, name, lang ); +} + + +/********************************************************************** + * FindResourceA (KERNEL32.@) + */ +HRSRC WINAPI FindResourceA( HMODULE hModule, LPCSTR name, LPCSTR type ) +{ + return FindResourceExA( hModule, type, name, MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL ) ); +} + + +/********************************************************************** + * FindResourceExW (KERNEL32.@) + */ +HRSRC WINAPI FindResourceExW( HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD lang ) +{ + TRACE( "%p %s %s %04x\n", hModule, debugstr_w(type), debugstr_w(name), lang ); + + if (!hModule) hModule = GetModuleHandleW(0); + return find_resourceW( hModule, type, name, lang ); +} + + +/********************************************************************** + * FindResourceW (KERNEL32.@) + */ +HRSRC WINAPI FindResourceW( HINSTANCE hModule, LPCWSTR name, LPCWSTR type ) +{ + return FindResourceExW( hModule, type, name, MAKELANGID( LANG_NEUTRAL, SUBLANG_NEUTRAL ) ); +} + + +/********************************************************************** + * EnumResourceTypesA (KERNEL32.@) + */ +BOOL WINAPI EnumResourceTypesA( HMODULE hmod, ENUMRESTYPEPROCA lpfun, LONG_PTR lparam ) +{ + int i; + BOOL ret = FALSE; + LPSTR type = NULL; + DWORD len = 0, newlen; + NTSTATUS status; + const IMAGE_RESOURCE_DIRECTORY *resdir; + const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; + const IMAGE_RESOURCE_DIR_STRING_U *str; + + TRACE( "%p %p %lx\n", hmod, lpfun, lparam ); + + if (!hmod) hmod = GetModuleHandleA( NULL ); + + if ((status = LdrFindResourceDirectory_U( hmod, NULL, 0, &resdir )) != STATUS_SUCCESS) + { + SetLastError( RtlNtStatusToDosError(status) ); + return FALSE; + } + et = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(resdir + 1); + for (i = 0; i < resdir->NumberOfNamedEntries+resdir->NumberOfIdEntries; i++) + { + if (et[i].u1.s1.NameIsString) + { + str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const BYTE *)resdir + et[i].u1.s1.NameOffset); + newlen = WideCharToMultiByte( CP_ACP, 0, str->NameString, str->Length, NULL, 0, NULL, NULL); + if (newlen + 1 > len) + { + len = newlen + 1; + HeapFree( GetProcessHeap(), 0, type ); + if (!(type = HeapAlloc( GetProcessHeap(), 0, len ))) return FALSE; + } + WideCharToMultiByte( CP_ACP, 0, str->NameString, str->Length, type, len, NULL, NULL); + type[newlen] = 0; + ret = lpfun(hmod,type,lparam); + } + else + { + ret = lpfun( hmod, UIntToPtr(et[i].u1.Id), lparam ); + } + if (!ret) break; + } + HeapFree( GetProcessHeap(), 0, type ); + return ret; +} + + +/********************************************************************** + * EnumResourceTypesW (KERNEL32.@) + */ +BOOL WINAPI EnumResourceTypesW( HMODULE hmod, ENUMRESTYPEPROCW lpfun, LONG_PTR lparam ) +{ + int i, len = 0; + BOOL ret = FALSE; + LPWSTR type = NULL; + NTSTATUS status; + const IMAGE_RESOURCE_DIRECTORY *resdir; + const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; + const IMAGE_RESOURCE_DIR_STRING_U *str; + + TRACE( "%p %p %lx\n", hmod, lpfun, lparam ); + + if (!hmod) hmod = GetModuleHandleW( NULL ); + + if ((status = LdrFindResourceDirectory_U( hmod, NULL, 0, &resdir )) != STATUS_SUCCESS) + { + SetLastError( RtlNtStatusToDosError(status) ); + return FALSE; + } + et = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(resdir + 1); + for (i = 0; i < resdir->NumberOfNamedEntries + resdir->NumberOfIdEntries; i++) + { + if (et[i].u1.s1.NameIsString) + { + str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const BYTE *)resdir + et[i].u1.s1.NameOffset); + if (str->Length + 1 > len) + { + len = str->Length + 1; + HeapFree( GetProcessHeap(), 0, type ); + if (!(type = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return FALSE; + } + memcpy(type, str->NameString, str->Length * sizeof (WCHAR)); + type[str->Length] = 0; + ret = lpfun(hmod,type,lparam); + } + else + { + ret = lpfun( hmod, UIntToPtr(et[i].u1.Id), lparam ); + } + if (!ret) break; + } + HeapFree( GetProcessHeap(), 0, type ); + return ret; +} + + +/********************************************************************** + * EnumResourceNamesA (KERNEL32.@) + */ +BOOL WINAPI EnumResourceNamesA( HMODULE hmod, LPCSTR type, ENUMRESNAMEPROCA lpfun, LONG_PTR lparam ) +{ + int i; + BOOL ret = FALSE; + DWORD len = 0, newlen; + LPSTR name = NULL; + NTSTATUS status; + UNICODE_STRING typeW; + LDR_RESOURCE_INFO info; + const IMAGE_RESOURCE_DIRECTORY *basedir, *resdir; + const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; + const IMAGE_RESOURCE_DIR_STRING_U *str; + + TRACE( "%p %s %p %lx\n", hmod, debugstr_a(type), lpfun, lparam ); + + if (!hmod) hmod = GetModuleHandleA( NULL ); + typeW.Buffer = NULL; + if ((status = LdrFindResourceDirectory_U( hmod, NULL, 0, &basedir )) != STATUS_SUCCESS) + goto done; + if ((status = get_res_nameA( type, &typeW )) != STATUS_SUCCESS) + goto done; + info.Type = (ULONG_PTR)typeW.Buffer; + if ((status = LdrFindResourceDirectory_U( hmod, &info, 1, &resdir )) != STATUS_SUCCESS) + goto done; + + et = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(resdir + 1); + __TRY + { + for (i = 0; i < resdir->NumberOfNamedEntries+resdir->NumberOfIdEntries; i++) + { + if (et[i].u1.s1.NameIsString) + { + str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const BYTE *)basedir + et[i].u1.s1.NameOffset); + newlen = WideCharToMultiByte(CP_ACP, 0, str->NameString, str->Length, NULL, 0, NULL, NULL); + if (newlen + 1 > len) + { + len = newlen + 1; + HeapFree( GetProcessHeap(), 0, name ); + if (!(name = HeapAlloc(GetProcessHeap(), 0, len + 1 ))) + { + ret = FALSE; + break; + } + } + WideCharToMultiByte( CP_ACP, 0, str->NameString, str->Length, name, len, NULL, NULL ); + name[newlen] = 0; + ret = lpfun(hmod,type,name,lparam); + } + else + { + ret = lpfun( hmod, type, UIntToPtr(et[i].u1.Id), lparam ); + } + if (!ret) break; + } + } + __EXCEPT_PAGE_FAULT + { + ret = FALSE; + status = STATUS_ACCESS_VIOLATION; + } + __ENDTRY + +done: + HeapFree( GetProcessHeap(), 0, name ); + if (!IS_INTRESOURCE(typeW.Buffer)) HeapFree( GetProcessHeap(), 0, typeW.Buffer ); + if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); + return ret; +} + + +/********************************************************************** + * EnumResourceNamesW (KERNEL32.@) + */ +BOOL WINAPI EnumResourceNamesW( HMODULE hmod, LPCWSTR type, ENUMRESNAMEPROCW lpfun, LONG_PTR lparam ) +{ + int i, len = 0; + BOOL ret = FALSE; + LPWSTR name = NULL; + NTSTATUS status; + UNICODE_STRING typeW; + LDR_RESOURCE_INFO info; + const IMAGE_RESOURCE_DIRECTORY *basedir, *resdir; + const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; + const IMAGE_RESOURCE_DIR_STRING_U *str; + + TRACE( "%p %s %p %lx\n", hmod, debugstr_w(type), lpfun, lparam ); + + if (!hmod) hmod = GetModuleHandleW( NULL ); + typeW.Buffer = NULL; + if ((status = LdrFindResourceDirectory_U( hmod, NULL, 0, &basedir )) != STATUS_SUCCESS) + goto done; + if ((status = get_res_nameW( type, &typeW )) != STATUS_SUCCESS) + goto done; + info.Type = (ULONG_PTR)typeW.Buffer; + if ((status = LdrFindResourceDirectory_U( hmod, &info, 1, &resdir )) != STATUS_SUCCESS) + goto done; + + et = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(resdir + 1); + __TRY + { + for (i = 0; i < resdir->NumberOfNamedEntries+resdir->NumberOfIdEntries; i++) + { + if (et[i].u1.s1.NameIsString) + { + str = (const IMAGE_RESOURCE_DIR_STRING_U *)((const BYTE *)basedir + et[i].u1.s1.NameOffset); + if (str->Length + 1 > len) + { + len = str->Length + 1; + HeapFree( GetProcessHeap(), 0, name ); + if (!(name = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) + { + ret = FALSE; + break; + } + } + memcpy(name, str->NameString, str->Length * sizeof (WCHAR)); + name[str->Length] = 0; + ret = lpfun(hmod,type,name,lparam); + } + else + { + ret = lpfun( hmod, type, UIntToPtr(et[i].u1.Id), lparam ); + } + if (!ret) break; + } + } + __EXCEPT_PAGE_FAULT + { + ret = FALSE; + status = STATUS_ACCESS_VIOLATION; + } + __ENDTRY +done: + HeapFree( GetProcessHeap(), 0, name ); + if (!IS_INTRESOURCE(typeW.Buffer)) HeapFree( GetProcessHeap(), 0, typeW.Buffer ); + if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); + return ret; +} + + +/********************************************************************** + * EnumResourceLanguagesA (KERNEL32.@) + */ +BOOL WINAPI EnumResourceLanguagesA( HMODULE hmod, LPCSTR type, LPCSTR name, + ENUMRESLANGPROCA lpfun, LONG_PTR lparam ) +{ + int i; + BOOL ret = FALSE; + NTSTATUS status; + UNICODE_STRING typeW, nameW; + LDR_RESOURCE_INFO info; + const IMAGE_RESOURCE_DIRECTORY *basedir, *resdir; + const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; + + TRACE( "%p %s %s %p %lx\n", hmod, debugstr_a(type), debugstr_a(name), lpfun, lparam ); + + if (!hmod) hmod = GetModuleHandleA( NULL ); + typeW.Buffer = nameW.Buffer = NULL; + if ((status = LdrFindResourceDirectory_U( hmod, NULL, 0, &basedir )) != STATUS_SUCCESS) + goto done; + if ((status = get_res_nameA( type, &typeW )) != STATUS_SUCCESS) + goto done; + if ((status = get_res_nameA( name, &nameW )) != STATUS_SUCCESS) + goto done; + info.Type = (ULONG_PTR)typeW.Buffer; + info.Name = (ULONG_PTR)nameW.Buffer; + if ((status = LdrFindResourceDirectory_U( hmod, &info, 2, &resdir )) != STATUS_SUCCESS) + goto done; + + et = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(resdir + 1); + __TRY + { + for (i = 0; i < resdir->NumberOfNamedEntries + resdir->NumberOfIdEntries; i++) + { + ret = lpfun( hmod, type, name, et[i].u1.Id, lparam ); + if (!ret) break; + } + } + __EXCEPT_PAGE_FAULT + { + ret = FALSE; + status = STATUS_ACCESS_VIOLATION; + } + __ENDTRY +done: + if (!IS_INTRESOURCE(typeW.Buffer)) HeapFree( GetProcessHeap(), 0, typeW.Buffer ); + if (!IS_INTRESOURCE(nameW.Buffer)) HeapFree( GetProcessHeap(), 0, nameW.Buffer ); + if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); + return ret; +} + + +/********************************************************************** + * EnumResourceLanguagesW (KERNEL32.@) + */ +BOOL WINAPI EnumResourceLanguagesW( HMODULE hmod, LPCWSTR type, LPCWSTR name, + ENUMRESLANGPROCW lpfun, LONG_PTR lparam ) +{ + int i; + BOOL ret = FALSE; + NTSTATUS status; + UNICODE_STRING typeW, nameW; + LDR_RESOURCE_INFO info; + const IMAGE_RESOURCE_DIRECTORY *basedir, *resdir; + const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; + + TRACE( "%p %s %s %p %lx\n", hmod, debugstr_w(type), debugstr_w(name), lpfun, lparam ); + + if (!hmod) hmod = GetModuleHandleW( NULL ); + typeW.Buffer = nameW.Buffer = NULL; + if ((status = LdrFindResourceDirectory_U( hmod, NULL, 0, &basedir )) != STATUS_SUCCESS) + goto done; + if ((status = get_res_nameW( type, &typeW )) != STATUS_SUCCESS) + goto done; + if ((status = get_res_nameW( name, &nameW )) != STATUS_SUCCESS) + goto done; + info.Type = (ULONG_PTR)typeW.Buffer; + info.Name = (ULONG_PTR)nameW.Buffer; + if ((status = LdrFindResourceDirectory_U( hmod, &info, 2, &resdir )) != STATUS_SUCCESS) + goto done; + + et = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(resdir + 1); + __TRY + { + for (i = 0; i < resdir->NumberOfNamedEntries + resdir->NumberOfIdEntries; i++) + { + ret = lpfun( hmod, type, name, et[i].u1.Id, lparam ); + if (!ret) break; + } + } + __EXCEPT_PAGE_FAULT + { + ret = FALSE; + status = STATUS_ACCESS_VIOLATION; + } + __ENDTRY +done: + if (!IS_INTRESOURCE(typeW.Buffer)) HeapFree( GetProcessHeap(), 0, typeW.Buffer ); + if (!IS_INTRESOURCE(nameW.Buffer)) HeapFree( GetProcessHeap(), 0, nameW.Buffer ); + if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); + return ret; +} + + +/********************************************************************** + * LoadResource (KERNEL32.@) + */ +HGLOBAL WINAPI LoadResource( HINSTANCE hModule, HRSRC hRsrc ) +{ + NTSTATUS status; + void *ret = NULL; + + TRACE( "%p %p\n", hModule, hRsrc ); + + if (!hRsrc) return 0; + if (!hModule) hModule = GetModuleHandleA( NULL ); + status = LdrAccessResource( hModule, (IMAGE_RESOURCE_DATA_ENTRY *)hRsrc, &ret, NULL ); + if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); + return ret; +} + + +/********************************************************************** + * LockResource (KERNEL32.@) + */ +LPVOID WINAPI LockResource( HGLOBAL handle ) +{ + return handle; +} + + +/********************************************************************** + * FreeResource (KERNEL32.@) + */ +BOOL WINAPI FreeResource( HGLOBAL handle ) +{ + return 0; +} + + +/********************************************************************** + * SizeofResource (KERNEL32.@) + */ +DWORD WINAPI SizeofResource( HINSTANCE hModule, HRSRC hRsrc ) +{ + if (!hRsrc) return 0; + return ((PIMAGE_RESOURCE_DATA_ENTRY)hRsrc)->Size; +} /* * Data structure for updating resources. @@ -39,6 +602,13 @@ typedef struct struct list root; } QUEUEDUPDATES; +/* this structure is shared for types and names */ +struct resource_dir_entry { + struct list entry; + LPWSTR id; + struct list children; +}; + /* this structure is the leaf */ struct resource_data { struct list entry; @@ -48,60 +618,191 @@ struct resource_data { void *lpData; }; -struct resource_size_info { - DWORD types_ofs; - DWORD names_ofs; - DWORD langs_ofs; - DWORD data_entry_ofs; - DWORD strings_ofs; - DWORD data_ofs; - DWORD total_size; -}; - -/* this structure is shared for types and names */ -struct resource_dir_entry { - struct list entry; - LPWSTR id; - struct list children; -}; - -struct mapping_info { - HANDLE file; - HANDLE mapping; - void *base; - DWORD size; - BOOL read_write; -}; - static int resource_strcmp( LPCWSTR a, LPCWSTR b ) { if ( a == b ) return 0; - if (HIWORD( a ) && HIWORD( b ) ) + if (!IS_INTRESOURCE( a ) && !IS_INTRESOURCE( b ) ) return lstrcmpW( a, b ); /* strings come before ids */ - if (HIWORD( a ) && !HIWORD( b )) + if (!IS_INTRESOURCE( a ) && IS_INTRESOURCE( b )) return -1; - if (HIWORD( b ) && !HIWORD( a )) + if (!IS_INTRESOURCE( b ) && IS_INTRESOURCE( a )) return 1; return ( a < b ) ? -1 : 1; } +static struct resource_dir_entry *find_resource_dir_entry( struct list *dir, LPCWSTR id ) +{ + struct resource_dir_entry *ent; + + /* match either IDs or strings */ + LIST_FOR_EACH_ENTRY( ent, dir, struct resource_dir_entry, entry ) + if (!resource_strcmp( id, ent->id )) + return ent; + + return NULL; +} + +static struct resource_data *find_resource_data( struct list *dir, LANGID lang ) +{ + struct resource_data *res_data; + + /* match only languages here */ + LIST_FOR_EACH_ENTRY( res_data, dir, struct resource_data, entry ) + if ( lang == res_data->lang ) + return res_data; + + return NULL; +} + +static void add_resource_dir_entry( struct list *dir, struct resource_dir_entry *resdir ) +{ + struct resource_dir_entry *ent; + + LIST_FOR_EACH_ENTRY( ent, dir, struct resource_dir_entry, entry ) + { + if (0>resource_strcmp( ent->id, resdir->id )) + continue; + + list_add_before( &ent->entry, &resdir->entry ); + return; + } + list_add_tail( dir, &resdir->entry ); +} + +static void add_resource_data_entry( struct list *dir, struct resource_data *resdata ) +{ + struct resource_data *ent; + + LIST_FOR_EACH_ENTRY( ent, dir, struct resource_data, entry ) + { + if (ent->lang < resdata->lang) + continue; + + list_add_before( &ent->entry, &resdata->entry ); + return; + } + list_add_tail( dir, &resdata->entry ); +} static LPWSTR res_strdupW( LPCWSTR str ) { LPWSTR ret; UINT len; - if (HIWORD(str) == 0) + if (IS_INTRESOURCE(str)) return (LPWSTR) (UINT_PTR) LOWORD(str); len = (lstrlenW( str ) + 1) * sizeof (WCHAR); ret = HeapAlloc( GetProcessHeap(), 0, len ); - if (!ret) return NULL; memcpy( ret, str, len ); return ret; } +static void res_free_str( LPWSTR str ) +{ + if (!IS_INTRESOURCE(str)) + HeapFree( GetProcessHeap(), 0, str ); +} + +static BOOL update_add_resource( QUEUEDUPDATES *updates, LPCWSTR Type, LPCWSTR Name, + LANGID Lang, struct resource_data *resdata, + BOOL overwrite_existing ) +{ + struct resource_dir_entry *restype, *resname; + struct resource_data *existing; + + TRACE("%p %s %s %p %d\n", updates, + debugstr_w(Type), debugstr_w(Name), resdata, overwrite_existing ); + + restype = find_resource_dir_entry( &updates->root, Type ); + if (!restype) + { + restype = HeapAlloc( GetProcessHeap(), 0, sizeof *restype ); + restype->id = res_strdupW( Type ); + list_init( &restype->children ); + add_resource_dir_entry( &updates->root, restype ); + } + + resname = find_resource_dir_entry( &restype->children, Name ); + if (!resname) + { + resname = HeapAlloc( GetProcessHeap(), 0, sizeof *resname ); + resname->id = res_strdupW( Name ); + list_init( &resname->children ); + add_resource_dir_entry( &restype->children, resname ); + } + + /* + * If there's an existing resource entry with matching (Type,Name,Language) + * it needs to be removed before adding the new data. + */ + existing = find_resource_data( &resname->children, Lang ); + if (existing) + { + if (!overwrite_existing) + return FALSE; + list_remove( &existing->entry ); + HeapFree( GetProcessHeap(), 0, existing ); + } + + if (resdata) + add_resource_data_entry( &resname->children, resdata ); + + return TRUE; +} + +static struct resource_data *allocate_resource_data( WORD Language, DWORD codepage, + LPVOID lpData, DWORD cbData, BOOL copy_data ) +{ + struct resource_data *resdata; + + if (!lpData || !cbData) + return NULL; + + resdata = HeapAlloc( GetProcessHeap(), 0, sizeof *resdata + (copy_data ? cbData : 0) ); + if (resdata) + { + resdata->lang = Language; + resdata->codepage = codepage; + resdata->cbData = cbData; + if (copy_data) + { + resdata->lpData = &resdata[1]; + memcpy( resdata->lpData, lpData, cbData ); + } + else + resdata->lpData = lpData; + } + + return resdata; +} + +static void free_resource_directory( struct list *head, int level ) +{ + struct list *ptr = NULL; + + while ((ptr = list_head( head ))) + { + list_remove( ptr ); + if (level) + { + struct resource_dir_entry *ent; + + ent = LIST_ENTRY( ptr, struct resource_dir_entry, entry ); + res_free_str( ent->id ); + free_resource_directory( &ent->children, level - 1 ); + HeapFree(GetProcessHeap(), 0, ent); + } + else + { + struct resource_data *data; + + data = LIST_ENTRY( ptr, struct resource_data, entry ); + HeapFree( GetProcessHeap(), 0, data ); + } + } +} static IMAGE_NT_HEADERS *get_nt_header( void *base, DWORD mapping_size ) { @@ -171,9 +872,9 @@ static BOOL check_pe_exe( HANDLE file, QUEUEDUPDATES *updates ) if (!nt) goto done; - DPRINT("resources: %08x %08x\n", - nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress, - nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].Size); + TRACE("resources: %08x %08x\n", + nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].VirtualAddress, + nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].Size); sec = get_section_header( base, mapping_size, &num_sections ); if (!sec) @@ -190,180 +891,445 @@ done: return ret; } +struct resource_size_info { + DWORD types_ofs; + DWORD names_ofs; + DWORD langs_ofs; + DWORD data_entry_ofs; + DWORD strings_ofs; + DWORD data_ofs; + DWORD total_size; +}; -static struct resource_data *allocate_resource_data( WORD Language, DWORD codepage, - LPVOID lpData, DWORD cbData, BOOL copy_data ) +struct mapping_info { + HANDLE file; + void *base; + DWORD size; + BOOL read_write; +}; + +static const IMAGE_SECTION_HEADER *section_from_rva( void *base, DWORD mapping_size, DWORD rva ) { - struct resource_data *resdata; + const IMAGE_SECTION_HEADER *sec; + DWORD num_sections = 0; + int i; - if (!lpData || !cbData) + sec = get_section_header( base, mapping_size, &num_sections ); + if (!sec) return NULL; - resdata = HeapAlloc( GetProcessHeap(), 0, sizeof *resdata + (copy_data ? cbData : 0) ); - if (resdata) + for (i=num_sections-1; i>=0; i--) { - resdata->lang = Language; - resdata->codepage = codepage; - resdata->cbData = cbData; - if (copy_data) + if (sec[i].VirtualAddress <= rva && + rva <= (DWORD)sec[i].VirtualAddress + sec[i].SizeOfRawData) { - resdata->lpData = &resdata[1]; - memcpy( resdata->lpData, lpData, cbData ); + return &sec[i]; } - else - resdata->lpData = lpData; } - return resdata; -} - -static void add_resource_dir_entry( struct list *dir, struct resource_dir_entry *resdir ) -{ - struct resource_dir_entry *ent; - - LIST_FOR_EACH_ENTRY( ent, dir, struct resource_dir_entry, entry ) - { - if (0>resource_strcmp( ent->id, resdir->id )) - continue; - - list_add_before( &ent->entry, &resdir->entry ); - return; - } - list_add_tail( dir, &resdir->entry ); -} - -static void add_resource_data_entry( struct list *dir, struct resource_data *resdata ) -{ - struct resource_data *ent; - - LIST_FOR_EACH_ENTRY( ent, dir, struct resource_data, entry ) - { - if (ent->lang < resdata->lang) - continue; - - list_add_before( &ent->entry, &resdata->entry ); - return; - } - list_add_tail( dir, &resdata->entry ); -} - -static struct resource_dir_entry *find_resource_dir_entry( struct list *dir, LPCWSTR id ) -{ - struct resource_dir_entry *ent; - - /* match either IDs or strings */ - LIST_FOR_EACH_ENTRY( ent, dir, struct resource_dir_entry, entry ) - if (!resource_strcmp( id, ent->id )) - return ent; - return NULL; } - -static struct resource_data *find_resource_data( struct list *dir, LANGID lang ) +static void *address_from_rva( void *base, DWORD mapping_size, DWORD rva, DWORD len ) { - struct resource_data *res_data; + const IMAGE_SECTION_HEADER *sec; - /* match only languages here */ - LIST_FOR_EACH_ENTRY( res_data, dir, struct resource_data, entry ) - if ( lang == res_data->lang ) - return res_data; + sec = section_from_rva( base, mapping_size, rva ); + if (!sec) + return NULL; + + if (rva + len <= (DWORD)sec->VirtualAddress + sec->SizeOfRawData) + return (void*)((LPBYTE) base + (sec->PointerToRawData + rva - sec->VirtualAddress)); return NULL; } - -static BOOL update_add_resource( QUEUEDUPDATES *updates, LPCWSTR Type, LPCWSTR Name, - struct resource_data *resdata, BOOL overwrite_existing ) +static LPWSTR resource_dup_string( const IMAGE_RESOURCE_DIRECTORY *root, const IMAGE_RESOURCE_DIRECTORY_ENTRY *entry ) { - struct resource_dir_entry *restype, *resname; - struct resource_data *existing; + const IMAGE_RESOURCE_DIR_STRING_U* string; + LPWSTR s; - DPRINT("%p %s %s %p %d\n", updates, - Type, Name, resdata, overwrite_existing ); + if (!entry->u1.s1.NameIsString) + return UIntToPtr(entry->u1.Id); - restype = find_resource_dir_entry( &updates->root, Type ); - if (!restype) + string = (const IMAGE_RESOURCE_DIR_STRING_U*) (((const char *)root) + entry->u1.s1.NameOffset); + s = HeapAlloc(GetProcessHeap(), 0, (string->Length + 1)*sizeof (WCHAR) ); + memcpy( s, string->NameString, (string->Length + 1)*sizeof (WCHAR) ); + s[string->Length] = 0; + + return s; +} + +/* this function is based on the code in winedump's pe.c */ +static BOOL enumerate_mapped_resources( QUEUEDUPDATES *updates, + void *base, DWORD mapping_size, + const IMAGE_RESOURCE_DIRECTORY *root ) +{ + const IMAGE_RESOURCE_DIRECTORY *namedir, *langdir; + const IMAGE_RESOURCE_DIRECTORY_ENTRY *e1, *e2, *e3; + const IMAGE_RESOURCE_DATA_ENTRY *data; + DWORD i, j, k; + + TRACE("version (%d.%d) %d named %d id entries\n", + root->MajorVersion, root->MinorVersion, root->NumberOfNamedEntries, root->NumberOfIdEntries); + + for (i = 0; i< root->NumberOfNamedEntries + root->NumberOfIdEntries; i++) { - restype = HeapAlloc( GetProcessHeap(), 0, sizeof *restype ); - if (!restype) return FALSE; - restype->id = res_strdupW( Type ); - list_init( &restype->children ); - add_resource_dir_entry( &updates->root, restype ); - } + LPWSTR Type; - resname = find_resource_dir_entry( &restype->children, Name ); - if (!resname) - { - resname = HeapAlloc( GetProcessHeap(), 0, sizeof *resname ); - if (!resname) return FALSE; - resname->id = res_strdupW( Name ); - list_init( &resname->children ); - add_resource_dir_entry( &restype->children, resname ); - } + e1 = (const IMAGE_RESOURCE_DIRECTORY_ENTRY*)(root + 1) + i; - /* - * If there's an existing resource entry with matching (Type,Name,Language) - * it needs to be removed before adding the new data. - */ - existing = find_resource_data( &resname->children, resdata->lang ); - if (existing) - { - if (!overwrite_existing) - return FALSE; - list_remove( &existing->entry ); - HeapFree( GetProcessHeap(), 0, existing ); - } + Type = resource_dup_string( root, e1 ); - add_resource_data_entry( &resname->children, resdata ); + namedir = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + e1->u2.s3.OffsetToDirectory); + for (j = 0; j < namedir->NumberOfNamedEntries + namedir->NumberOfIdEntries; j++) + { + LPWSTR Name; + + e2 = (const IMAGE_RESOURCE_DIRECTORY_ENTRY*)(namedir + 1) + j; + + Name = resource_dup_string( root, e2 ); + + langdir = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + e2->u2.s3.OffsetToDirectory); + for (k = 0; k < langdir->NumberOfNamedEntries + langdir->NumberOfIdEntries; k++) + { + LANGID Lang; + void *p; + struct resource_data *resdata; + + e3 = (const IMAGE_RESOURCE_DIRECTORY_ENTRY*)(langdir + 1) + k; + + Lang = e3->u1.Id; + + data = (const IMAGE_RESOURCE_DATA_ENTRY *)((const char *)root + e3->u2.OffsetToData); + + p = address_from_rva( base, mapping_size, data->OffsetToData, data->Size ); + + resdata = allocate_resource_data( Lang, data->CodePage, p, data->Size, FALSE ); + if (resdata) + { + if (!update_add_resource( updates, Type, Name, Lang, resdata, FALSE )) + HeapFree( GetProcessHeap(), 0, resdata ); + } + } + res_free_str( Name ); + } + res_free_str( Type ); + } return TRUE; } - -/* retrieve the resource name to pass to the ntdll functions */ -static NTSTATUS get_res_nameA( LPCSTR name, UNICODE_STRING *str ) +static BOOL read_mapped_resources( QUEUEDUPDATES *updates, void *base, DWORD mapping_size ) { - if (!HIWORD(name)) - { - str->Buffer = (LPWSTR)name; - return STATUS_SUCCESS; - } - if (name[0] == '#') - { - ULONG value; - if (RtlCharToInteger( name + 1, 10, &value ) != STATUS_SUCCESS || HIWORD(value)) - return STATUS_INVALID_PARAMETER; - str->Buffer = (LPWSTR)value; - return STATUS_SUCCESS; - } - RtlCreateUnicodeStringFromAsciiz( str, name ); - RtlUpcaseUnicodeString( str, str, FALSE ); - return STATUS_SUCCESS; + const IMAGE_RESOURCE_DIRECTORY *root; + const IMAGE_NT_HEADERS *nt; + const IMAGE_SECTION_HEADER *sec; + DWORD num_sections = 0, i; + + nt = get_nt_header( base, mapping_size ); + if (!nt) + return FALSE; + + sec = get_section_header( base, mapping_size, &num_sections ); + if (!sec) + return FALSE; + + for (i=0; i mapping_size || + (sec[i].PointerToRawData + sec[i].SizeOfRawData) > mapping_size) + return TRUE; + + TRACE("found .rsrc at %08x, size %08x\n", sec[i].PointerToRawData, sec[i].SizeOfRawData); + + if (!sec[i].PointerToRawData || sec[i].SizeOfRawData < sizeof(IMAGE_RESOURCE_DIRECTORY)) + return TRUE; + + root = (void*) ((BYTE*)base + sec[i].PointerToRawData); + enumerate_mapped_resources( updates, base, mapping_size, root ); + + return TRUE; } -/* retrieve the resource name to pass to the ntdll functions */ -static NTSTATUS get_res_nameW( LPCWSTR name, UNICODE_STRING *str ) +static BOOL map_file_into_memory( struct mapping_info *mi ) { - if (!HIWORD(name)) + DWORD page_attr, perm; + HANDLE mapping; + + if (mi->read_write) { - str->Buffer = (LPWSTR)name; - return STATUS_SUCCESS; + page_attr = PAGE_READWRITE; + perm = FILE_MAP_WRITE | FILE_MAP_READ; } - if (name[0] == '#') + else { - ULONG value; - RtlInitUnicodeString( str, name + 1 ); - if (RtlUnicodeStringToInteger( str, 10, &value ) != STATUS_SUCCESS || HIWORD(value)) - return STATUS_INVALID_PARAMETER; - str->Buffer = (LPWSTR)value; - return STATUS_SUCCESS; + page_attr = PAGE_READONLY; + perm = FILE_MAP_READ; } - RtlCreateUnicodeString( str, name ); - RtlUpcaseUnicodeString( str, str, FALSE ); - return STATUS_SUCCESS; + + mapping = CreateFileMappingW( mi->file, NULL, page_attr, 0, 0, NULL ); + if (!mapping) return FALSE; + + mi->base = MapViewOfFile( mapping, perm, 0, 0, mi->size ); + CloseHandle( mapping ); + + return mi->base != NULL; } +static BOOL unmap_file_from_memory( struct mapping_info *mi ) +{ + if (mi->base) + UnmapViewOfFile( mi->base ); + mi->base = NULL; + return TRUE; +} + +static void destroy_mapping( struct mapping_info *mi ) +{ + if (!mi) + return; + unmap_file_from_memory( mi ); + if (mi->file) + CloseHandle( mi->file ); + HeapFree( GetProcessHeap(), 0, mi ); +} + +static struct mapping_info *create_mapping( LPCWSTR name, BOOL rw ) +{ + struct mapping_info *mi; + + mi = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof *mi ); + if (!mi) + return NULL; + + mi->read_write = rw; + + mi->file = CreateFileW( name, GENERIC_READ | (rw ? GENERIC_WRITE : 0), + 0, NULL, OPEN_EXISTING, 0, 0 ); + + if (mi->file != INVALID_HANDLE_VALUE) + { + mi->size = GetFileSize( mi->file, NULL ); + + if (map_file_into_memory( mi )) + return mi; + } + destroy_mapping( mi ); + return NULL; +} + +static BOOL resize_mapping( struct mapping_info *mi, DWORD new_size ) +{ + if (!unmap_file_from_memory( mi )) + return FALSE; + + /* change the file size */ + SetFilePointer( mi->file, new_size, NULL, FILE_BEGIN ); + if (!SetEndOfFile( mi->file )) + { + ERR("failed to set file size to %08x\n", new_size ); + return FALSE; + } + + mi->size = new_size; + + return map_file_into_memory( mi ); +} + +static void get_resource_sizes( QUEUEDUPDATES *updates, struct resource_size_info *si ) +{ + struct resource_dir_entry *types, *names; + struct resource_data *data; + DWORD num_types = 0, num_names = 0, num_langs = 0, strings_size = 0, data_size = 0; + + memset( si, 0, sizeof *si ); + + LIST_FOR_EACH_ENTRY( types, &updates->root, struct resource_dir_entry, entry ) + { + num_types++; + if (!IS_INTRESOURCE( types->id )) + strings_size += sizeof (WORD) + lstrlenW( types->id )*sizeof (WCHAR); + + LIST_FOR_EACH_ENTRY( names, &types->children, struct resource_dir_entry, entry ) + { + num_names++; + + if (!IS_INTRESOURCE( names->id )) + strings_size += sizeof (WORD) + lstrlenW( names->id )*sizeof (WCHAR); + + LIST_FOR_EACH_ENTRY( data, &names->children, struct resource_data, entry ) + { + num_langs++; + data_size += (data->cbData + 3) & ~3; + } + } + } + + /* names are at the end of the types */ + si->names_ofs = sizeof (IMAGE_RESOURCE_DIRECTORY) + + num_types * sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); + + /* language directories are at the end of the names */ + si->langs_ofs = si->names_ofs + + num_types * sizeof (IMAGE_RESOURCE_DIRECTORY) + + num_names * sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); + + si->data_entry_ofs = si->langs_ofs + + num_names * sizeof (IMAGE_RESOURCE_DIRECTORY) + + num_langs * sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); + + si->strings_ofs = si->data_entry_ofs + + num_langs * sizeof (IMAGE_RESOURCE_DATA_ENTRY); + + si->data_ofs = si->strings_ofs + ((strings_size + 3) & ~3); + + si->total_size = si->data_ofs + data_size; + + TRACE("names %08x langs %08x data entries %08x strings %08x data %08x total %08x\n", + si->names_ofs, si->langs_ofs, si->data_entry_ofs, + si->strings_ofs, si->data_ofs, si->total_size); +} + +static void res_write_padding( BYTE *res_base, DWORD size ) +{ + static const BYTE pad[] = { + 'P','A','D','D','I','N','G','X','X','P','A','D','D','I','N','G' }; + DWORD i; + + for ( i = 0; i < size / sizeof pad; i++ ) + memcpy( &res_base[i*sizeof pad], pad, sizeof pad ); + memcpy( &res_base[i*sizeof pad], pad, size%sizeof pad ); +} + +static BOOL write_resources( QUEUEDUPDATES *updates, LPBYTE base, struct resource_size_info *si, DWORD rva ) +{ + struct resource_dir_entry *types, *names; + struct resource_data *data; + IMAGE_RESOURCE_DIRECTORY *root; + + TRACE("%p %p %p %08x\n", updates, base, si, rva ); + + memset( base, 0, si->total_size ); + + /* the root entry always exists */ + root = (IMAGE_RESOURCE_DIRECTORY*) base; + memset( root, 0, sizeof *root ); + root->MajorVersion = 4; + si->types_ofs = sizeof *root; + LIST_FOR_EACH_ENTRY( types, &updates->root, struct resource_dir_entry, entry ) + { + IMAGE_RESOURCE_DIRECTORY_ENTRY *e1; + IMAGE_RESOURCE_DIRECTORY *namedir; + + e1 = (IMAGE_RESOURCE_DIRECTORY_ENTRY*) &base[si->types_ofs]; + memset( e1, 0, sizeof *e1 ); + if (!IS_INTRESOURCE( types->id )) + { + WCHAR *strings; + DWORD len; + + root->NumberOfNamedEntries++; + e1->u1.s1.NameIsString = 1; + e1->u1.s1.NameOffset = si->strings_ofs; + + strings = (WCHAR*) &base[si->strings_ofs]; + len = lstrlenW( types->id ); + strings[0] = len; + memcpy( &strings[1], types->id, len * sizeof (WCHAR) ); + si->strings_ofs += (len + 1) * sizeof (WCHAR); + } + else + { + root->NumberOfIdEntries++; + e1->u1.Id = LOWORD( types->id ); + } + e1->u2.s3.OffsetToDirectory = si->names_ofs; + e1->u2.s3.DataIsDirectory = TRUE; + si->types_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); + + namedir = (IMAGE_RESOURCE_DIRECTORY*) &base[si->names_ofs]; + memset( namedir, 0, sizeof *namedir ); + namedir->MajorVersion = 4; + si->names_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY); + + LIST_FOR_EACH_ENTRY( names, &types->children, struct resource_dir_entry, entry ) + { + IMAGE_RESOURCE_DIRECTORY_ENTRY *e2; + IMAGE_RESOURCE_DIRECTORY *langdir; + + e2 = (IMAGE_RESOURCE_DIRECTORY_ENTRY*) &base[si->names_ofs]; + memset( e2, 0, sizeof *e2 ); + if (!IS_INTRESOURCE( names->id )) + { + WCHAR *strings; + DWORD len; + + namedir->NumberOfNamedEntries++; + e2->u1.s1.NameIsString = 1; + e2->u1.s1.NameOffset = si->strings_ofs; + + strings = (WCHAR*) &base[si->strings_ofs]; + len = lstrlenW( names->id ); + strings[0] = len; + memcpy( &strings[1], names->id, len * sizeof (WCHAR) ); + si->strings_ofs += (len + 1) * sizeof (WCHAR); + } + else + { + namedir->NumberOfIdEntries++; + e2->u1.Id = LOWORD( names->id ); + } + e2->u2.s3.OffsetToDirectory = si->langs_ofs; + e2->u2.s3.DataIsDirectory = TRUE; + si->names_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); + + langdir = (IMAGE_RESOURCE_DIRECTORY*) &base[si->langs_ofs]; + memset( langdir, 0, sizeof *langdir ); + langdir->MajorVersion = 4; + si->langs_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY); + + LIST_FOR_EACH_ENTRY( data, &names->children, struct resource_data, entry ) + { + IMAGE_RESOURCE_DIRECTORY_ENTRY *e3; + IMAGE_RESOURCE_DATA_ENTRY *de; + int pad_size; + + e3 = (IMAGE_RESOURCE_DIRECTORY_ENTRY*) &base[si->langs_ofs]; + memset( e3, 0, sizeof *e3 ); + langdir->NumberOfIdEntries++; + e3->u1.Id = LOWORD( data->lang ); + e3->u2.OffsetToData = si->data_entry_ofs; + + si->langs_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); + + /* write out all the data entries */ + de = (IMAGE_RESOURCE_DATA_ENTRY*) &base[si->data_entry_ofs]; + memset( de, 0, sizeof *de ); + de->OffsetToData = si->data_ofs + rva; + de->Size = data->cbData; + de->CodePage = data->codepage; + si->data_entry_ofs += sizeof (IMAGE_RESOURCE_DATA_ENTRY); + + /* write out the resource data */ + memcpy( &base[si->data_ofs], data->lpData, data->cbData ); + si->data_ofs += data->cbData; + + pad_size = (-si->data_ofs)&3; + res_write_padding( &base[si->data_ofs], pad_size ); + si->data_ofs += pad_size; + } + } + } + + return TRUE; +} /* * FIXME: @@ -400,319 +1366,11 @@ static IMAGE_SECTION_HEADER *get_resource_section( void *base, DWORD mapping_siz break; if (i == num_sections) - { - DPRINT("FIXME: .rsrc doesn't exist\n"); return NULL; - } return &sec[i]; } - -static const IMAGE_SECTION_HEADER *section_from_rva( void *base, DWORD mapping_size, DWORD rva ) -{ - const IMAGE_SECTION_HEADER *sec; - DWORD num_sections = 0; - int i; - - sec = get_section_header( base, mapping_size, &num_sections ); - if (!sec) - return NULL; - - for (i=num_sections-1; i>=0; i--) - { - if (sec[i].VirtualAddress <= rva && - rva <= (DWORD)sec[i].VirtualAddress + sec[i].SizeOfRawData) - { - return &sec[i]; - } - } - - return NULL; -} - - -static void *address_from_rva( void *base, DWORD mapping_size, DWORD rva, DWORD len ) -{ - const IMAGE_SECTION_HEADER *sec; - - sec = section_from_rva( base, mapping_size, rva ); - if (!sec) - return NULL; - - if (rva + len <= (DWORD)sec->VirtualAddress + sec->SizeOfRawData) - return (void*)((LPBYTE) base + (sec->PointerToRawData + rva - sec->VirtualAddress)); - - return NULL; -} - - -static void res_free_str( LPWSTR str ) -{ - if (HIWORD(str)) - HeapFree( GetProcessHeap(), 0, str ); -} - - -static LPWSTR resource_dup_string( const IMAGE_RESOURCE_DIRECTORY *root, const IMAGE_RESOURCE_DIRECTORY_ENTRY *entry ) -{ - const IMAGE_RESOURCE_DIR_STRING_U* string; - LPWSTR s; - - if (!entry->NameIsString) - return UIntToPtr(entry->Id); - - string = (const IMAGE_RESOURCE_DIR_STRING_U*) (((const char *)root) + entry->NameOffset); - s = HeapAlloc(GetProcessHeap(), 0, (string->Length + 1)*sizeof (WCHAR) ); - if (!s) return NULL; - memcpy( s, string->NameString, (string->Length + 1)*sizeof (WCHAR) ); - s[string->Length] = 0; - - return s; -} - - -/* this function is based on the code in winedump's pe.c */ -static BOOL enumerate_mapped_resources( QUEUEDUPDATES *updates, - void *base, DWORD mapping_size, - const IMAGE_RESOURCE_DIRECTORY *root ) -{ - const IMAGE_RESOURCE_DIRECTORY *namedir, *langdir; - const IMAGE_RESOURCE_DIRECTORY_ENTRY *e1, *e2, *e3; - const IMAGE_RESOURCE_DATA_ENTRY *data; - DWORD i, j, k; - - DPRINT("version (%d.%d) %d named %d id entries\n", - root->MajorVersion, root->MinorVersion, root->NumberOfNamedEntries, root->NumberOfIdEntries); - - for (i = 0; i< root->NumberOfNamedEntries + root->NumberOfIdEntries; i++) - { - LPWSTR Type; - - e1 = (const IMAGE_RESOURCE_DIRECTORY_ENTRY*)(root + 1) + i; - - Type = resource_dup_string( root, e1 ); - - namedir = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + e1->OffsetToDirectory); - for (j = 0; j < namedir->NumberOfNamedEntries + namedir->NumberOfIdEntries; j++) - { - LPWSTR Name; - - e2 = (const IMAGE_RESOURCE_DIRECTORY_ENTRY*)(namedir + 1) + j; - - Name = resource_dup_string( root, e2 ); - - langdir = (const IMAGE_RESOURCE_DIRECTORY *)((const char *)root + e2->OffsetToDirectory); - for (k = 0; k < langdir->NumberOfNamedEntries + langdir->NumberOfIdEntries; k++) - { - LANGID Lang; - void *p; - struct resource_data *resdata; - - e3 = (const IMAGE_RESOURCE_DIRECTORY_ENTRY*)(langdir + 1) + k; - - Lang = e3->Id; - - data = (const IMAGE_RESOURCE_DATA_ENTRY *)((const char *)root + e3->OffsetToData); - - p = address_from_rva( base, mapping_size, data->OffsetToData, data->Size ); - - resdata = allocate_resource_data( Lang, data->CodePage, p, data->Size, FALSE ); - if (resdata) - { - if (!update_add_resource( updates, Type, Name, resdata, FALSE )) - HeapFree( GetProcessHeap(), 0, resdata ); - } - } - res_free_str( Name ); - } - res_free_str( Type ); - } - - return TRUE; -} - - -static BOOL read_mapped_resources( QUEUEDUPDATES *updates, void *base, DWORD mapping_size ) -{ - const IMAGE_RESOURCE_DIRECTORY *root; - const IMAGE_NT_HEADERS *nt; - const IMAGE_SECTION_HEADER *sec; - DWORD num_sections = 0, i; - - nt = get_nt_header( base, mapping_size ); - if (!nt) - return FALSE; - - sec = get_section_header( base, mapping_size, &num_sections ); - if (!sec) - return FALSE; - - for (i=0; i mapping_size || - (sec[i].PointerToRawData + sec[i].SizeOfRawData) > mapping_size) - return TRUE; - - DPRINT("found .rsrc at %08x, size %08x\n", sec[i].PointerToRawData, sec[i].SizeOfRawData); - - if (!sec[i].PointerToRawData || sec[i].SizeOfRawData < sizeof(IMAGE_RESOURCE_DIRECTORY)) - return TRUE; - - root = (void*) ((BYTE*)base + sec[i].PointerToRawData); - enumerate_mapped_resources( updates, base, mapping_size, root ); - - return TRUE; -} - - -static BOOL unmap_file_from_memory( struct mapping_info *mi ) -{ - if (mi->base) - UnmapViewOfFile( mi->base ); - mi->base = NULL; - if (mi->mapping) - CloseHandle( mi->mapping ); - mi->mapping = NULL; - return TRUE; -} - - -static BOOL map_file_into_memory( struct mapping_info *mi ) -{ - DWORD page_attr, perm; - - if (mi->read_write) - { - page_attr = PAGE_READWRITE; - perm = FILE_MAP_WRITE | FILE_MAP_READ; - } - else - { - page_attr = PAGE_READONLY; - perm = FILE_MAP_READ; - } - - mi->mapping = CreateFileMappingW( mi->file, NULL, page_attr, 0, 0, NULL ); - if (!mi->mapping) - return FALSE; - - mi->base = MapViewOfFile( mi->mapping, perm, 0, 0, mi->size ); - if (!mi->base) - return FALSE; - - return TRUE; -} - - -static struct mapping_info *create_mapping( LPCWSTR name, BOOL rw ) -{ - struct mapping_info *mi; - - mi = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof *mi ); - if (!mi) - return NULL; - - mi->read_write = rw; - - mi->file = CreateFileW( name, GENERIC_READ | (rw ? GENERIC_WRITE : 0), - 0, NULL, OPEN_EXISTING, 0, 0 ); - - if (mi->file != INVALID_HANDLE_VALUE) - { - mi->size = GetFileSize( mi->file, NULL ); - - if (map_file_into_memory( mi )) - return mi; - } - - unmap_file_from_memory( mi ); - HeapFree( GetProcessHeap(), 0, mi ); - - return NULL; -} - - -static void get_resource_sizes( QUEUEDUPDATES *updates, struct resource_size_info *si ) -{ - struct resource_dir_entry *types, *names; - struct resource_data *data; - DWORD num_types = 0, num_names = 0, num_langs = 0, strings_size = 0, data_size = 0; - - memset( si, 0, sizeof *si ); - - LIST_FOR_EACH_ENTRY( types, &updates->root, struct resource_dir_entry, entry ) - { - num_types++; - if (HIWORD( types->id )) - strings_size += sizeof (WORD) + lstrlenW( types->id )*sizeof (WCHAR); - - LIST_FOR_EACH_ENTRY( names, &types->children, struct resource_dir_entry, entry ) - { - num_names++; - - if (HIWORD( names->id )) - strings_size += sizeof (WORD) + lstrlenW( names->id )*sizeof (WCHAR); - - LIST_FOR_EACH_ENTRY( data, &names->children, struct resource_data, entry ) - { - num_langs++; - data_size += (data->cbData + 3) & ~3; - } - } - } - - /* names are at the end of the types */ - si->names_ofs = sizeof (IMAGE_RESOURCE_DIRECTORY) + - num_types * sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); - - /* language directories are at the end of the names */ - si->langs_ofs = si->names_ofs + - num_types * sizeof (IMAGE_RESOURCE_DIRECTORY) + - num_names * sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); - - si->data_entry_ofs = si->langs_ofs + - num_names * sizeof (IMAGE_RESOURCE_DIRECTORY) + - num_langs * sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); - - si->strings_ofs = si->data_entry_ofs + - num_langs * sizeof (IMAGE_RESOURCE_DATA_ENTRY); - - si->data_ofs = si->strings_ofs + ((strings_size + 3) & ~3); - - si->total_size = si->data_ofs + data_size; - - DPRINT("names %08x langs %08x data entries %08x strings %08x data %08x total %08x\n", - si->names_ofs, si->langs_ofs, si->data_entry_ofs, - si->strings_ofs, si->data_ofs, si->total_size); -} - - -static BOOL resize_mapping( struct mapping_info *mi, DWORD new_size ) -{ - if (!unmap_file_from_memory( mi )) - return FALSE; - - /* change the file size */ - SetFilePointer( mi->file, new_size, NULL, FILE_BEGIN ); - if (!SetEndOfFile( mi->file )) - { - DPRINT("failed to set file size to %08x\n", new_size ); - return FALSE; - } - - mi->size = new_size; - - return map_file_into_memory( mi ); -} - - static DWORD get_init_data_size( void *base, DWORD mapping_size ) { DWORD i, sz = 0, num_sections = 0; @@ -724,191 +1382,16 @@ static DWORD get_init_data_size( void *base, DWORD mapping_size ) if (s[i].Characteristics & IMAGE_SCN_CNT_INITIALIZED_DATA) sz += s[i].SizeOfRawData; - DPRINT("size = %08x\n", sz); + TRACE("size = %08x\n", sz); return sz; } - -static void res_write_padding( BYTE *res_base, DWORD size ) -{ - static const BYTE pad[] = { - 'P','A','D','D','I','N','G','X','X','P','A','D','D','I','N','G' }; - DWORD i; - - for ( i = 0; i < size / sizeof pad; i++ ) - memcpy( &res_base[i*sizeof pad], pad, sizeof pad ); - memcpy( &res_base[i*sizeof pad], pad, size%sizeof pad ); -} - - -static void destroy_mapping( struct mapping_info *mi ) -{ - if (!mi) - return; - unmap_file_from_memory( mi ); - if (mi->file) - CloseHandle( mi->file ); - HeapFree( GetProcessHeap(), 0, mi ); -} - - -static void free_resource_directory( struct list *head, int level ) -{ - struct list *ptr = NULL; - - while ((ptr = list_head( head ))) - { - list_remove( ptr ); - if (level) - { - struct resource_dir_entry *ent; - - ent = LIST_ENTRY( ptr, struct resource_dir_entry, entry ); - res_free_str( ent->id ); - free_resource_directory( &ent->children, level - 1 ); - HeapFree(GetProcessHeap(), 0, ent); - } - else - { - struct resource_data *data; - - data = LIST_ENTRY( ptr, struct resource_data, entry ); - HeapFree( GetProcessHeap(), 0, data ); - } - } -} - - -static BOOL write_resources( QUEUEDUPDATES *updates, LPBYTE base, struct resource_size_info *si, DWORD rva ) -{ - struct resource_dir_entry *types, *names; - struct resource_data *data; - IMAGE_RESOURCE_DIRECTORY *root; - - DPRINT("%p %p %p %08x\n", updates, base, si, rva ); - - memset( base, 0, si->total_size ); - - /* the root entry always exists */ - root = (IMAGE_RESOURCE_DIRECTORY*) base; - memset( root, 0, sizeof *root ); - root->MajorVersion = 4; - si->types_ofs = sizeof *root; - LIST_FOR_EACH_ENTRY( types, &updates->root, struct resource_dir_entry, entry ) - { - IMAGE_RESOURCE_DIRECTORY_ENTRY *e1; - IMAGE_RESOURCE_DIRECTORY *namedir; - - e1 = (IMAGE_RESOURCE_DIRECTORY_ENTRY*) &base[si->types_ofs]; - memset( e1, 0, sizeof *e1 ); - if (HIWORD( types->id )) - { - WCHAR *strings; - DWORD len; - - root->NumberOfNamedEntries++; - e1->NameIsString = 1; - e1->NameOffset = si->strings_ofs; - - strings = (WCHAR*) &base[si->strings_ofs]; - len = lstrlenW( types->id ); - strings[0] = len; - memcpy( &strings[1], types->id, len * sizeof (WCHAR) ); - si->strings_ofs += (len + 1) * sizeof (WCHAR); - } - else - { - root->NumberOfIdEntries++; - e1->Id = LOWORD( types->id ); - } - e1->OffsetToDirectory = si->names_ofs; - e1->DataIsDirectory = TRUE; - si->types_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); - - namedir = (IMAGE_RESOURCE_DIRECTORY*) &base[si->names_ofs]; - memset( namedir, 0, sizeof *namedir ); - namedir->MajorVersion = 4; - si->names_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY); - - LIST_FOR_EACH_ENTRY( names, &types->children, struct resource_dir_entry, entry ) - { - IMAGE_RESOURCE_DIRECTORY_ENTRY *e2; - IMAGE_RESOURCE_DIRECTORY *langdir; - - e2 = (IMAGE_RESOURCE_DIRECTORY_ENTRY*) &base[si->names_ofs]; - memset( e2, 0, sizeof *e2 ); - if (HIWORD( names->id )) - { - WCHAR *strings; - DWORD len; - - namedir->NumberOfNamedEntries++; - e2->NameIsString = 1; - e2->NameOffset = si->strings_ofs; - - strings = (WCHAR*) &base[si->strings_ofs]; - len = lstrlenW( names->id ); - strings[0] = len; - memcpy( &strings[1], names->id, len * sizeof (WCHAR) ); - si->strings_ofs += (len + 1) * sizeof (WCHAR); - } - else - { - namedir->NumberOfIdEntries++; - e2->Id = LOWORD( names->id ); - } - e2->OffsetToDirectory = si->langs_ofs; - e2->DataIsDirectory = TRUE; - si->names_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); - - langdir = (IMAGE_RESOURCE_DIRECTORY*) &base[si->langs_ofs]; - memset( langdir, 0, sizeof *langdir ); - langdir->MajorVersion = 4; - si->langs_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY); - - LIST_FOR_EACH_ENTRY( data, &names->children, struct resource_data, entry ) - { - IMAGE_RESOURCE_DIRECTORY_ENTRY *e3; - IMAGE_RESOURCE_DATA_ENTRY *de; - int pad_size; - - e3 = (IMAGE_RESOURCE_DIRECTORY_ENTRY*) &base[si->langs_ofs]; - memset( e3, 0, sizeof *e3 ); - langdir->NumberOfIdEntries++; - e3->Id = LOWORD( data->lang ); - e3->OffsetToData = si->data_entry_ofs; - - si->langs_ofs += sizeof (IMAGE_RESOURCE_DIRECTORY_ENTRY); - - /* write out all the data entries */ - de = (IMAGE_RESOURCE_DATA_ENTRY*) &base[si->data_entry_ofs]; - memset( de, 0, sizeof *de ); - de->OffsetToData = si->data_ofs + rva; - de->Size = data->cbData; - de->CodePage = data->codepage; - si->data_entry_ofs += sizeof (IMAGE_RESOURCE_DATA_ENTRY); - - /* write out the resource data */ - memcpy( &base[si->data_ofs], data->lpData, data->cbData ); - si->data_ofs += data->cbData; - - pad_size = (-si->data_ofs)&3; - res_write_padding( &base[si->data_ofs], pad_size ); - si->data_ofs += pad_size; - } - } - } - - return TRUE; -} - - static BOOL write_raw_resources( QUEUEDUPDATES *updates ) { static const WCHAR prefix[] = { 'r','e','s','u',0 }; WCHAR tempdir[MAX_PATH], tempfile[MAX_PATH]; - DWORD mapping_size, section_size, old_size; + DWORD section_size; BOOL ret = FALSE; IMAGE_SECTION_HEADER *sec; IMAGE_NT_HEADERS *nt; @@ -927,7 +1410,7 @@ static BOOL write_raw_resources( QUEUEDUPDATES *updates ) if (!CopyFileW( updates->pFileName, tempfile, FALSE )) goto done; - DPRINT("tempfile %s\n", tempfile); + TRACE("tempfile %s\n", debugstr_w(tempfile)); if (!updates->bDeleteExistingResources) { @@ -938,7 +1421,7 @@ static BOOL write_raw_resources( QUEUEDUPDATES *updates ) ret = read_mapped_resources( updates, read_map->base, read_map->size ); if (!ret) { - DPRINT("failed to read existing resources\n"); + ERR("failed to read existing resources\n"); goto done; } } @@ -953,77 +1436,138 @@ static BOOL write_raw_resources( QUEUEDUPDATES *updates ) if (nt->OptionalHeader.SectionAlignment <= 0) { - DPRINT("invalid section alignment %04x\n", nt->OptionalHeader.SectionAlignment); + ERR("invalid section alignment %04x\n", nt->OptionalHeader.SectionAlignment); + goto done; + } + + if (nt->OptionalHeader.FileAlignment <= 0) + { + ERR("invalid file alignment %04x\n", nt->OptionalHeader.FileAlignment); goto done; } sec = get_resource_section( write_map->base, write_map->size ); - if (!sec) - goto done; + if (!sec) /* no section, add one */ + { + DWORD num_sections; + + sec = get_section_header( write_map->base, write_map->size, &num_sections ); + if (!sec) + goto done; + + sec += num_sections; + nt->FileHeader.NumberOfSections++; + + memset( sec, 0, sizeof *sec ); + memcpy( sec->Name, ".rsrc", 5 ); + sec->Characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ; + sec->VirtualAddress = nt->OptionalHeader.SizeOfImage; + } if (!sec->PointerToRawData) /* empty section */ { - sec->PointerToRawData = write_map->size; + sec->PointerToRawData = write_map->size + (-write_map->size) % nt->OptionalHeader.FileAlignment; sec->SizeOfRawData = 0; } - else if ((sec->SizeOfRawData + sec->PointerToRawData) != write_map->size) - { - DPRINT(".rsrc isn't at the end of the image %08x + %08x != %08x for %s\n", - sec->SizeOfRawData, sec->PointerToRawData, write_map->size, updates->pFileName); - goto done; - } - DPRINT("before .rsrc at %08x, size %08x\n", sec->PointerToRawData, sec->SizeOfRawData); + TRACE("before .rsrc at %08x, size %08x\n", sec->PointerToRawData, sec->SizeOfRawData); get_resource_sizes( updates, &res_size ); /* round up the section size */ section_size = res_size.total_size; - section_size += (-section_size) % nt->OptionalHeader.SectionAlignment; + section_size += (-section_size) % nt->OptionalHeader.FileAlignment; - mapping_size = sec->PointerToRawData + section_size; - - DPRINT("requires %08x (%08x) bytes\n", res_size.total_size, section_size ); + TRACE("requires %08x (%08x) bytes\n", res_size.total_size, section_size ); /* check if the file size needs to be changed */ if (section_size != sec->SizeOfRawData) { - old_size = write_map->size; + DWORD old_size = write_map->size; + DWORD virtual_section_size = res_size.total_size + (-res_size.total_size) % nt->OptionalHeader.SectionAlignment; + int delta = section_size - (sec->SizeOfRawData + (-sec->SizeOfRawData) % nt->OptionalHeader.FileAlignment); + int rva_delta = virtual_section_size - + (sec->Misc.VirtualSize + (-sec->Misc.VirtualSize) % nt->OptionalHeader.SectionAlignment); + BOOL rsrc_is_last = sec->PointerToRawData + sec->SizeOfRawData == old_size; + /* align .rsrc size when possible */ + DWORD mapping_size = rsrc_is_last ? sec->PointerToRawData + section_size : old_size + delta; - DPRINT("file size %08x -> %08x\n", old_size, mapping_size); + /* postpone file truncation if there are some data to be moved down from file end */ + BOOL resize_after = mapping_size < old_size && !rsrc_is_last; - /* unmap the file before changing the file size */ - ret = resize_mapping( write_map, mapping_size ); + TRACE("file size %08x -> %08x\n", old_size, mapping_size); - /* get the pointers again - they might be different after remapping */ - nt = get_nt_header( write_map->base, mapping_size ); - if (!nt) + if (!resize_after) { - DPRINT("couldn't get NT header\n"); - goto done; + /* unmap the file before changing the file size */ + ret = resize_mapping( write_map, mapping_size ); + + /* get the pointers again - they might be different after remapping */ + nt = get_nt_header( write_map->base, mapping_size ); + if (!nt) + { + ERR("couldn't get NT header\n"); + goto done; + } + + sec = get_resource_section( write_map->base, mapping_size ); + if (!sec) + goto done; } - sec = get_resource_section( write_map->base, mapping_size ); - if (!sec) - goto done; + if (!rsrc_is_last) /* not last section, relocate trailing sections */ + { + IMAGE_SECTION_HEADER *s; + DWORD tail_start = sec->PointerToRawData + sec->SizeOfRawData; + DWORD i, num_sections = 0; + + memmove( (char*)write_map->base + tail_start + delta, (char*)write_map->base + tail_start, old_size - tail_start ); + + s = get_section_header( write_map->base, mapping_size, &num_sections ); + + for (i=0; i sec->PointerToRawData) + { + s[i].PointerToRawData += delta; + s[i].VirtualAddress += rva_delta; + } + } + } + + if (resize_after) + { + ret = resize_mapping( write_map, mapping_size ); + + nt = get_nt_header( write_map->base, mapping_size ); + if (!nt) + { + ERR("couldn't get NT header\n"); + goto done; + } + + sec = get_resource_section( write_map->base, mapping_size ); + if (!sec) + goto done; + } /* adjust the PE header information */ - nt->OptionalHeader.SizeOfImage += (mapping_size - old_size); sec->SizeOfRawData = section_size; - sec->Misc.VirtualSize = section_size; + sec->Misc.VirtualSize = virtual_section_size; + nt->OptionalHeader.SizeOfImage += rva_delta; nt->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_RESOURCE].Size = res_size.total_size; nt->OptionalHeader.SizeOfInitializedData = get_init_data_size( write_map->base, mapping_size ); } res_base = (LPBYTE) write_map->base + sec->PointerToRawData; - DPRINT("base = %p offset = %08x\n", write_map->base, sec->PointerToRawData); + TRACE("base = %p offset = %08x\n", write_map->base, sec->PointerToRawData); ret = write_resources( updates, res_base, &res_size, sec->VirtualAddress ); res_write_padding( res_base + res_size.total_size, section_size - res_size.total_size ); - DPRINT("after .rsrc at %08x, size %08x\n", sec->PointerToRawData, sec->SizeOfRawData); + TRACE("after .rsrc at %08x, size %08x\n", sec->PointerToRawData, sec->SizeOfRawData); done: destroy_mapping( read_map ); @@ -1037,234 +1581,15 @@ done: return ret; } - -/* - * @implemented +/*********************************************************************** + * BeginUpdateResourceW (KERNEL32.@) */ -HRSRC -WINAPI -FindResourceA ( - HINSTANCE hModule, - LPCSTR lpName, - LPCSTR lpType - ) -{ - return FindResourceExA (hModule, lpType, lpName, 0); -} - - -/* - * @implemented - */ -HRSRC -WINAPI -FindResourceExA( - HINSTANCE hModule, - LPCSTR lpType, - LPCSTR lpName, - WORD wLanguage - ) -{ - UNICODE_STRING TypeU; - UNICODE_STRING NameU; - ANSI_STRING Type; - ANSI_STRING Name; - HRSRC Res; - - RtlInitUnicodeString (&NameU, - NULL); - RtlInitUnicodeString (&TypeU, - NULL); - - if (HIWORD(lpName) != 0) - { - RtlInitAnsiString (&Name, - (LPSTR)lpName); - RtlAnsiStringToUnicodeString (&NameU, - &Name, - TRUE); - } - else - NameU.Buffer = (PWSTR)lpName; - - if (HIWORD(lpType) != 0) - { - RtlInitAnsiString (&Type, - (LPSTR)lpType); - RtlAnsiStringToUnicodeString (&TypeU, - &Type, - TRUE); - } - else - TypeU.Buffer = (PWSTR)lpType; - - Res = FindResourceExW (hModule, - TypeU.Buffer, - NameU.Buffer, - wLanguage); - - if (HIWORD(lpName) != 0) - RtlFreeUnicodeString (&NameU); - - if (HIWORD(lpType) != 0) - RtlFreeUnicodeString (&TypeU); - - return Res; -} - - -/* - * @implemented - */ -HRSRC -WINAPI -FindResourceW ( - HINSTANCE hModule, - LPCWSTR lpName, - LPCWSTR lpType - ) -{ - return FindResourceExW (hModule, lpType, lpName, 0); -} - - -/* - * @implemented - */ -HRSRC -WINAPI -FindResourceExW ( - HINSTANCE hModule, - LPCWSTR lpType, - LPCWSTR lpName, - WORD wLanguage - ) -{ - PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry = NULL; - LDR_RESOURCE_INFO ResourceInfo; - NTSTATUS Status; - - if ( hModule == NULL ) - hModule = (HINSTANCE)GetModuleHandleW(NULL); - - _SEH2_TRY - { - if ( !IS_INTRESOURCE(lpName) && lpName[0] == L'#' ) { - lpName = MAKEINTRESOURCEW(wcstoul(lpName + 1, NULL, 10)); - } - if ( !IS_INTRESOURCE(lpType) && lpType[0] == L'#' ) { - lpType = MAKEINTRESOURCEW(wcstoul(lpType + 1, NULL, 10)); - } - - ResourceInfo.Type = (ULONG)lpType; - ResourceInfo.Name = (ULONG)lpName; - ResourceInfo.Language = (ULONG)wLanguage; - - Status = LdrFindResource_U (hModule, - &ResourceInfo, - RESOURCE_DATA_LEVEL, - &ResourceDataEntry); - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - Status = _SEH2_GetExceptionCode(); - } - _SEH2_END; - - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus (Status); - return NULL; - } - - return (HRSRC)ResourceDataEntry; -} - - -/* - * @implemented - */ -HGLOBAL -WINAPI -LoadResource ( - HINSTANCE hModule, - HRSRC hResInfo - ) -{ - NTSTATUS Status; - PVOID Data; - PIMAGE_RESOURCE_DATA_ENTRY ResInfo = (PIMAGE_RESOURCE_DATA_ENTRY)hResInfo; - - if (hModule == NULL) - { - hModule = (HINSTANCE)GetModuleHandleW(NULL); - } - - Status = LdrAccessResource (hModule, ResInfo, &Data, NULL); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus (Status); - return NULL; - } - - return Data; -} - - -/* - * @implemented - */ -DWORD -WINAPI -SizeofResource ( - HINSTANCE hModule, - HRSRC hResInfo - ) -{ - return ((PIMAGE_RESOURCE_DATA_ENTRY)hResInfo)->Size; -} - - -/* - * @unimplemented - */ -BOOL -WINAPI -FreeResource ( - HGLOBAL hResData - ) -{ - return TRUE; -} - - -/* - * @implemented - */ -LPVOID -WINAPI -LockResource ( - HGLOBAL hResData - ) -{ - return (LPVOID)hResData; -} - - -/* - * @implemented - */ -HANDLE -WINAPI -BeginUpdateResourceW ( - LPCWSTR pFileName, - BOOL bDeleteExistingResources - ) +HANDLE WINAPI BeginUpdateResourceW( LPCWSTR pFileName, BOOL bDeleteExistingResources ) { QUEUEDUPDATES *updates = NULL; HANDLE hUpdate, file, ret = NULL; - DPRINT("%s, %d\n", pFileName, bDeleteExistingResources); + TRACE("%s, %d\n", debugstr_w(pFileName), bDeleteExistingResources); hUpdate = GlobalAlloc(GHND, sizeof(QUEUEDUPDATES)); if (!hUpdate) @@ -1302,15 +1627,10 @@ BeginUpdateResourceW ( } -/* - * @implemented +/*********************************************************************** + * BeginUpdateResourceA (KERNEL32.@) */ -HANDLE -WINAPI -BeginUpdateResourceA ( - LPCSTR pFileName, - BOOL bDeleteExistingResources - ) +HANDLE WINAPI BeginUpdateResourceA( LPCSTR pFileName, BOOL bDeleteExistingResources ) { UNICODE_STRING FileNameW; HANDLE ret; @@ -1321,20 +1641,15 @@ BeginUpdateResourceA ( } -/* - * @implemented +/*********************************************************************** + * EndUpdateResourceW (KERNEL32.@) */ -BOOL -WINAPI -EndUpdateResourceW ( - HANDLE hUpdate, - BOOL fDiscard - ) +BOOL WINAPI EndUpdateResourceW( HANDLE hUpdate, BOOL fDiscard ) { QUEUEDUPDATES *updates; BOOL ret; - DPRINT("%p %d\n", hUpdate, fDiscard); + TRACE("%p %d\n", hUpdate, fDiscard); updates = GlobalLock(hUpdate); if (!updates) @@ -1352,419 +1667,66 @@ EndUpdateResourceW ( } -/* - * @implemented +/*********************************************************************** + * EndUpdateResourceA (KERNEL32.@) */ -BOOL -WINAPI -EndUpdateResourceA ( - HANDLE hUpdate, - BOOL fDiscard - ) +BOOL WINAPI EndUpdateResourceA( HANDLE hUpdate, BOOL fDiscard ) { - return EndUpdateResourceW( - hUpdate, - fDiscard - ); + return EndUpdateResourceW(hUpdate, fDiscard); } -/* - * @implemented +/*********************************************************************** + * UpdateResourceW (KERNEL32.@) */ -BOOL -WINAPI -EnumResourceLanguagesW( - HMODULE hmod, - LPCWSTR type, - LPCWSTR name, - ENUMRESLANGPROCW lpfun, - LONG_PTR lparam - ) -{ - int i; - BOOL ret = FALSE; - NTSTATUS status; - UNICODE_STRING typeW, nameW; - LDR_RESOURCE_INFO info; - PIMAGE_RESOURCE_DIRECTORY basedir, resdir; - PIMAGE_RESOURCE_DIRECTORY_ENTRY et; - - DPRINT( "%p %s %s %p %lx\n", hmod, type, name, lpfun, lparam ); - - if (!hmod) hmod = GetModuleHandleW( NULL ); - typeW.Buffer = nameW.Buffer = NULL; - if ((status = LdrFindResourceDirectory_U( hmod, NULL, 0, &basedir )) != STATUS_SUCCESS) - goto done; - if ((status = get_res_nameW( type, &typeW )) != STATUS_SUCCESS) - goto done; - if ((status = get_res_nameW( name, &nameW )) != STATUS_SUCCESS) - goto done; - info.Type = (ULONG_PTR)typeW.Buffer; - info.Name = (ULONG_PTR)nameW.Buffer; - if ((status = LdrFindResourceDirectory_U( hmod, &info, 2, &resdir )) != STATUS_SUCCESS) - goto done; - - et = (PIMAGE_RESOURCE_DIRECTORY_ENTRY)(resdir + 1); - for (i = 0; i < resdir->NumberOfNamedEntries + resdir->NumberOfIdEntries; i++) - { - ret = lpfun( hmod, type, name, et[i].Id, lparam ); - if (!ret) break; - } -done: - if (HIWORD(typeW.Buffer)) HeapFree( GetProcessHeap(), 0, typeW.Buffer ); - if (HIWORD(nameW.Buffer)) HeapFree( GetProcessHeap(), 0, nameW.Buffer ); - if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); - return ret; -} - - -/* - * @implemented - */ -BOOL WINAPI -EnumResourceLanguagesA( - HMODULE hmod, - LPCSTR type, - LPCSTR name, - ENUMRESLANGPROCA lpfun, - LONG_PTR lparam - ) -{ - int i; - BOOL ret = FALSE; - NTSTATUS status; - UNICODE_STRING typeW, nameW; - LDR_RESOURCE_INFO info; - PIMAGE_RESOURCE_DIRECTORY basedir, resdir; - PIMAGE_RESOURCE_DIRECTORY_ENTRY et; - - DPRINT( "%p %s %s %p %lx\n", hmod, type, name, lpfun, lparam ); - - if (!hmod) hmod = GetModuleHandleA( NULL ); - typeW.Buffer = nameW.Buffer = NULL; - if ((status = LdrFindResourceDirectory_U( hmod, NULL, 0, &basedir )) != STATUS_SUCCESS) - goto done; - if ((status = get_res_nameA( type, &typeW )) != STATUS_SUCCESS) - goto done; - if ((status = get_res_nameA( name, &nameW )) != STATUS_SUCCESS) - goto done; - info.Type = (ULONG_PTR)typeW.Buffer; - info.Name = (ULONG_PTR)nameW.Buffer; - if ((status = LdrFindResourceDirectory_U( hmod, &info, 2, &resdir )) != STATUS_SUCCESS) - goto done; - - et = (PIMAGE_RESOURCE_DIRECTORY_ENTRY)(resdir + 1); - for (i = 0; i < resdir->NumberOfNamedEntries + resdir->NumberOfIdEntries; i++) - { - ret = lpfun( hmod, type, name, et[i].Id, lparam ); - if (!ret) break; - } -done: - if (HIWORD(typeW.Buffer)) HeapFree( GetProcessHeap(), 0, typeW.Buffer ); - if (HIWORD(nameW.Buffer)) HeapFree( GetProcessHeap(), 0, nameW.Buffer ); - if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); - return ret; -} - - -/********************************************************************** - * EnumResourceNamesA (KERNEL32.@) - */ -BOOL WINAPI EnumResourceNamesA( HMODULE hmod, LPCSTR type, ENUMRESNAMEPROCA lpfun, LONG_PTR lparam ) -{ - int i; - BOOL ret = FALSE; - DWORD len = 0, newlen; - LPSTR name = NULL; - NTSTATUS status; - UNICODE_STRING typeW; - LDR_RESOURCE_INFO info; - PIMAGE_RESOURCE_DIRECTORY basedir, resdir; - const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; - const IMAGE_RESOURCE_DIR_STRING_U *str; - - DPRINT( "%p %s %p %lx\n", hmod, type, lpfun, lparam ); - - if (!hmod) hmod = GetModuleHandleA( NULL ); - typeW.Buffer = NULL; - if ((status = LdrFindResourceDirectory_U( hmod, NULL, 0, &basedir )) != STATUS_SUCCESS) - goto done; - if ((status = get_res_nameA( type, &typeW )) != STATUS_SUCCESS) - goto done; - info.Type = (ULONG)typeW.Buffer; - if ((status = LdrFindResourceDirectory_U( hmod, &info, 1, &resdir )) != STATUS_SUCCESS) - goto done; - - et = (IMAGE_RESOURCE_DIRECTORY_ENTRY *)(resdir + 1); - for (i = 0; i < resdir->NumberOfNamedEntries+resdir->NumberOfIdEntries; i++) - { - if (et[i].NameIsString) - { - str = (IMAGE_RESOURCE_DIR_STRING_U *) ((LPBYTE) basedir + et[i].NameOffset); - newlen = WideCharToMultiByte(CP_ACP, 0, str->NameString, str->Length, NULL, 0, NULL, NULL); - if (newlen + 1 > len) - { - len = newlen + 1; - HeapFree( GetProcessHeap(), 0, name ); - if (!(name = HeapAlloc(GetProcessHeap(), 0, len + 1 ))) - { - ret = FALSE; - break; - } - } - WideCharToMultiByte( CP_ACP, 0, str->NameString, str->Length, name, len, NULL, NULL ); - name[newlen] = 0; - ret = lpfun(hmod,type,name,lparam); - } - else - { - ret = lpfun( hmod, type, (LPSTR)(int)et[i].Id, lparam ); - } - if (!ret) break; - } -done: - HeapFree( GetProcessHeap(), 0, name ); - if (HIWORD(typeW.Buffer)) HeapFree( GetProcessHeap(), 0, typeW.Buffer ); - if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); - return ret; -} - - -/********************************************************************** - * EnumResourceNamesW (KERNEL32.@) - */ -BOOL WINAPI EnumResourceNamesW( HMODULE hmod, LPCWSTR type, ENUMRESNAMEPROCW lpfun, LONG_PTR lparam ) -{ - int i, len = 0; - BOOL ret = FALSE; - LPWSTR name = NULL; - NTSTATUS status; - UNICODE_STRING typeW; - LDR_RESOURCE_INFO info; - PIMAGE_RESOURCE_DIRECTORY basedir, resdir; - const IMAGE_RESOURCE_DIRECTORY_ENTRY *et; - const IMAGE_RESOURCE_DIR_STRING_U *str; - - DPRINT( "%p %s %p %lx\n", hmod, type, lpfun, lparam ); - - if (!hmod) hmod = GetModuleHandleW( NULL ); - typeW.Buffer = NULL; - if ((status = LdrFindResourceDirectory_U( hmod, NULL, 0, &basedir )) != STATUS_SUCCESS) - goto done; - if ((status = get_res_nameW( type, &typeW )) != STATUS_SUCCESS) - goto done; - info.Type = (ULONG)typeW.Buffer; - if ((status = LdrFindResourceDirectory_U( hmod, &info, 1, &resdir )) != STATUS_SUCCESS) - goto done; - - et = (PIMAGE_RESOURCE_DIRECTORY_ENTRY)(resdir + 1); - for (i = 0; i < resdir->NumberOfNamedEntries+resdir->NumberOfIdEntries; i++) - { - if (et[i].NameIsString) - { - str = (IMAGE_RESOURCE_DIR_STRING_U *) ((LPBYTE) basedir + et[i].NameOffset); - if (str->Length + 1 > len) - { - len = str->Length + 1; - HeapFree( GetProcessHeap(), 0, name ); - if (!(name = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) - { - ret = FALSE; - break; - } - } - memcpy(name, str->NameString, str->Length * sizeof (WCHAR)); - name[str->Length] = 0; - ret = lpfun(hmod,type,name,lparam); - } - else - { - ret = lpfun( hmod, type, (LPWSTR)(int)et[i].Id, lparam ); - } - if (!ret) break; - } -done: - HeapFree( GetProcessHeap(), 0, name ); - if (HIWORD(typeW.Buffer)) HeapFree( GetProcessHeap(), 0, typeW.Buffer ); - if (status != STATUS_SUCCESS) SetLastError( RtlNtStatusToDosError(status) ); - return ret; -} - -/* - * @implemented - */ -BOOL -WINAPI -EnumResourceTypesW ( - HMODULE hmod, - ENUMRESTYPEPROCW lpfun, - LONG_PTR lparam - ) -{ - int i, len = 0; - BOOL ret = FALSE; - LPWSTR type = NULL; - NTSTATUS status; - PIMAGE_RESOURCE_DIRECTORY resdir; - PIMAGE_RESOURCE_DIRECTORY_ENTRY et; - PIMAGE_RESOURCE_DIR_STRING_U str; - - DPRINT( "%p %p %lx\n", hmod, lpfun, lparam ); - - if (!hmod) hmod = GetModuleHandleW( NULL ); - - if ((status = LdrFindResourceDirectory_U( hmod, NULL, 0, &resdir )) != STATUS_SUCCESS) - { - SetLastError( RtlNtStatusToDosError(status) ); - return FALSE; - } - et = (PIMAGE_RESOURCE_DIRECTORY_ENTRY)(resdir + 1); - for (i = 0; i < resdir->NumberOfNamedEntries + resdir->NumberOfIdEntries; i++) - { - if (et[i].NameIsString) - { - str = (PIMAGE_RESOURCE_DIR_STRING_U)((const BYTE *)resdir + et[i].NameOffset); - if (str->Length + 1 > len) - { - len = str->Length + 1; - HeapFree( GetProcessHeap(), 0, type ); - if (!(type = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return FALSE; - } - memcpy(type, str->NameString, str->Length * sizeof (WCHAR)); - type[str->Length] = 0; - ret = lpfun(hmod,type,lparam); - } - else - { - ret = lpfun( hmod, UIntToPtr(et[i].Id), lparam ); - } - if (!ret) break; - } - HeapFree( GetProcessHeap(), 0, type ); - return ret; -} - - -/* - * @implemented - */ -BOOL -WINAPI -EnumResourceTypesA ( - HMODULE hmod, - ENUMRESTYPEPROCA lpfun, - LONG_PTR lparam - ) -{ - int i; - BOOL ret = FALSE; - LPSTR type = NULL; - DWORD len = 0, newlen; - NTSTATUS status; - PIMAGE_RESOURCE_DIRECTORY resdir; - PIMAGE_RESOURCE_DIRECTORY_ENTRY et; - PIMAGE_RESOURCE_DIR_STRING_U str; - - DPRINT( "%p %p %lx\n", hmod, lpfun, lparam ); - - if (!hmod) hmod = GetModuleHandleA( NULL ); - - if ((status = LdrFindResourceDirectory_U( hmod, NULL, 0, &resdir )) != STATUS_SUCCESS) - { - SetLastError( RtlNtStatusToDosError(status) ); - return FALSE; - } - et = (PIMAGE_RESOURCE_DIRECTORY_ENTRY)(resdir + 1); - for (i = 0; i < resdir->NumberOfNamedEntries+resdir->NumberOfIdEntries; i++) - { - if (et[i].NameIsString) - { - str = (PIMAGE_RESOURCE_DIR_STRING_U)((const BYTE *)resdir + et[i].NameOffset); - newlen = WideCharToMultiByte( CP_ACP, 0, str->NameString, str->Length, NULL, 0, NULL, NULL); - if (newlen + 1 > len) - { - len = newlen + 1; - HeapFree( GetProcessHeap(), 0, type ); - if (!(type = HeapAlloc( GetProcessHeap(), 0, len ))) return FALSE; - } - WideCharToMultiByte( CP_ACP, 0, str->NameString, str->Length, type, len, NULL, NULL); - type[newlen] = 0; - ret = lpfun(hmod,type,lparam); - } - else - { - ret = lpfun( hmod, UIntToPtr(et[i].Id), lparam ); - } - if (!ret) break; - } - HeapFree( GetProcessHeap(), 0, type ); - return ret; -} - - -/* - * @implemented - */ -BOOL -WINAPI -UpdateResourceA ( - HANDLE hUpdate, - LPCSTR lpType, - LPCSTR lpName, - WORD wLanguage, - LPVOID lpData, - DWORD cbData - ) -{ - BOOL ret; - UNICODE_STRING TypeW; - UNICODE_STRING NameW; - if(!HIWORD(lpType)) - TypeW.Buffer = ULongToPtr(LOWORD(lpType)); - else - RtlCreateUnicodeStringFromAsciiz(&TypeW, lpType); - if(!HIWORD(lpName)) - NameW.Buffer = ULongToPtr(LOWORD(lpName)); - else - RtlCreateUnicodeStringFromAsciiz(&NameW, lpName); - ret = UpdateResourceW(hUpdate, TypeW.Buffer, NameW.Buffer, wLanguage, lpData, cbData); - if(HIWORD(lpType)) RtlFreeUnicodeString(&TypeW); - if(HIWORD(lpName)) RtlFreeUnicodeString(&NameW); - return ret; -} - - -/* - * @implemented - */ -BOOL -WINAPI -UpdateResourceW ( - HANDLE hUpdate, - LPCWSTR lpType, - LPCWSTR lpName, - WORD wLanguage, - LPVOID lpData, - DWORD cbData - ) +BOOL WINAPI UpdateResourceW( HANDLE hUpdate, LPCWSTR lpType, LPCWSTR lpName, + WORD wLanguage, LPVOID lpData, DWORD cbData) { QUEUEDUPDATES *updates; BOOL ret = FALSE; - DPRINT("%p %s %s %08x %p %d\n", hUpdate, - lpType, lpName, wLanguage, lpData, cbData); + TRACE("%p %s %s %08x %p %d\n", hUpdate, + debugstr_w(lpType), debugstr_w(lpName), wLanguage, lpData, cbData); updates = GlobalLock(hUpdate); if (updates) { - struct resource_data *data; - data = allocate_resource_data( wLanguage, 0, lpData, cbData, TRUE ); - if (data) - ret = update_add_resource( updates, lpType, lpName, data, TRUE ); + if (lpData == NULL && cbData == 0) /* remove resource */ + { + ret = update_add_resource( updates, lpType, lpName, wLanguage, NULL, TRUE ); + } + else + { + struct resource_data *data; + data = allocate_resource_data( wLanguage, 0, lpData, cbData, TRUE ); + if (data) + ret = update_add_resource( updates, lpType, lpName, wLanguage, data, TRUE ); + } GlobalUnlock(hUpdate); } return ret; } -/* EOF */ + +/*********************************************************************** + * UpdateResourceA (KERNEL32.@) + */ +BOOL WINAPI UpdateResourceA( HANDLE hUpdate, LPCSTR lpType, LPCSTR lpName, + WORD wLanguage, LPVOID lpData, DWORD cbData) +{ + BOOL ret; + UNICODE_STRING TypeW; + UNICODE_STRING NameW; + if(IS_INTRESOURCE(lpType)) + TypeW.Buffer = ULongToPtr(LOWORD(lpType)); + else + RtlCreateUnicodeStringFromAsciiz(&TypeW, lpType); + if(IS_INTRESOURCE(lpName)) + NameW.Buffer = ULongToPtr(LOWORD(lpName)); + else + RtlCreateUnicodeStringFromAsciiz(&NameW, lpName); + ret = UpdateResourceW(hUpdate, TypeW.Buffer, NameW.Buffer, wLanguage, lpData, cbData); + if(!IS_INTRESOURCE(lpType)) RtlFreeUnicodeString(&TypeW); + if(!IS_INTRESOURCE(lpName)) RtlFreeUnicodeString(&NameW); + return ret; +} diff --git a/reactos/dll/win32/kernel32/winnls/string/casemap.c b/reactos/dll/win32/kernel32/winnls/string/casemap.c index d038b895ab5..141a4172675 100644 --- a/reactos/dll/win32/kernel32/winnls/string/casemap.c +++ b/reactos/dll/win32/kernel32/winnls/string/casemap.c @@ -3,15 +3,15 @@ #include "wine/unicode.h" -const WCHAR wine_casemap_lower[3318] = +const WCHAR wine_casemap_lower[3802] = { /* index */ - 0x01bf, 0x02bf, 0x03bf, 0x0439, 0x0539, 0x0639, 0x0100, 0x0100, + 0x01bf, 0x02bf, 0x03bf, 0x044f, 0x054f, 0x064f, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0699, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0799, 0x0892, - 0x0100, 0x098f, 0x0100, 0x0100, 0x0a13, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0b13, 0x0100, 0x0100, 0x0100, + 0x06af, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x07af, 0x08ae, + 0x0100, 0x09ab, 0x0100, 0x0100, 0x0a2f, 0x0100, 0x0100, 0x0100, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0b2f, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, @@ -26,6 +26,7 @@ const WCHAR wine_casemap_lower[3318] = 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0c1d, 0x0cfb, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, @@ -36,8 +37,7 @@ const WCHAR wine_casemap_lower[3318] = 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0bf6, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0dda, /* defaults */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -162,23 +162,25 @@ const WCHAR wine_casemap_lower[3318] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x0386 .. 0x03ff */ - 0x0026, 0x0000, 0x0025, 0x0025, 0x0025, 0x0000, 0x0040, 0x0000, - 0x003f, 0x003f, 0x0000, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, + /* 0x0370 .. 0x03ff */ + 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0026, 0x0000, + 0x0025, 0x0025, 0x0025, 0x0000, 0x0040, 0x0000, 0x003f, 0x003f, + 0x0000, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0000, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0000, 0x0000, + 0x0020, 0x0020, 0x0000, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, + 0x0020, 0x0020, 0x0020, 0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffc4, 0x0000, - 0x0000, 0x0001, 0x0000, 0xfff9, 0x0001, 0x0000, 0x0000, 0xff7e, - 0xff7e, 0xff7e, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0xffc4, 0x0000, 0x0000, 0x0001, + 0x0000, 0xfff9, 0x0001, 0x0000, 0x0000, 0xff7e, 0xff7e, 0xff7e, /* 0x0400 .. 0x04ff */ 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, @@ -215,9 +217,9 @@ const WCHAR wine_casemap_lower[3318] = /* 0x0500 .. 0x05ff */ 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, @@ -278,52 +280,52 @@ const WCHAR wine_casemap_lower[3318] = 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe241, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + /* 0x1f01 .. 0x1fff */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, + 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, + 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, + 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, + 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, + 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, - 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1f07 .. 0x1fff */ - 0x0000, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, - 0xfff8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, - 0xfff8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, - 0xfff8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0xfff8, 0x0000, 0xfff8, 0x0000, 0xfff8, 0x0000, - 0xfff8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, - 0xfff8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xfff8, 0x0000, 0xfff8, 0x0000, 0xfff8, 0x0000, 0xfff8, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, + 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, - 0xfff8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, - 0xfff8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, - 0xfff8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xfff8, 0xfff8, 0xffb6, 0xffb6, 0xfff7, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xffaa, 0xffaa, 0xffaa, 0xffaa, 0xfff7, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xfff8, 0xfff8, 0xff9c, 0xff9c, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xfff8, 0xfff8, 0xff90, 0xff90, 0xfff9, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xff80, 0xff80, 0xff82, 0xff82, 0xfff7, 0x0000, 0x0000, - 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, + 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, + 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, + 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0xfff8, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, + 0xfff8, 0xffb6, 0xffb6, 0xfff7, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffaa, + 0xffaa, 0xffaa, 0xffaa, 0xfff7, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, + 0xfff8, 0xff9c, 0xff9c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xfff8, + 0xfff8, 0xff90, 0xff90, 0xfff9, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xff80, + 0xff80, 0xff82, 0xff82, 0xfff7, 0x0000, 0x0000, 0x0000, /* 0x2103 .. 0x21ff */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -389,9 +391,9 @@ const WCHAR wine_casemap_lower[3318] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0xd609, 0xf11a, 0xd619, 0x0000, 0x0000, 0x0001, - 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0xd5e4, 0xd603, 0xd5e1, + 0xd5e2, 0x0000, 0x0001, 0x0000, 0x0000, 0x0001, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xd5c1, 0xd5c1, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, @@ -405,14 +407,74 @@ const WCHAR wine_casemap_lower[3318] = 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 0xa612 .. 0xa6ff */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0xff1d .. 0xffff */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0020, 0x0020, 0x0020, 0x0020, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 0xa722 .. 0xa7ff */ + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, + 0x0000, 0x0001, 0x0000, 0x75fc, 0x0001, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0001, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 0xff21 .. 0xffff */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0000, 0x0000, + 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, + 0x0020, 0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -436,10 +498,9 @@ const WCHAR wine_casemap_lower[3318] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }; -const WCHAR wine_casemap_upper[3582] = +const WCHAR wine_casemap_upper[3994] = { /* index */ 0x019f, 0x029f, 0x039f, 0x045a, 0x0556, 0x0656, 0x0100, 0x0100, @@ -462,6 +523,7 @@ const WCHAR wine_casemap_upper[3582] = 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0cfe, 0x0ddb, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, @@ -472,8 +534,7 @@ const WCHAR wine_casemap_upper[3582] = 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0cfe, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0e9a, /* defaults */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -569,14 +630,14 @@ const WCHAR wine_casemap_upper[3582] = 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, + 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0x2a3f, + 0x2a3f, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0x0000, 0x0000, 0xff2e, 0xff32, 0x0000, 0xff33, 0xff33, + 0x2a1f, 0x2a1c, 0x2a1e, 0xff2e, 0xff32, 0x0000, 0xff33, 0xff33, 0x0000, 0xff36, 0x0000, 0xff35, 0x0000, 0x0000, 0x0000, 0x0000, 0xff33, 0x0000, 0x0000, 0xff31, 0x0000, 0x0000, 0x0000, 0x0000, 0xff2f, 0xff2d, 0x0000, 0x29f7, 0x0000, 0x0000, 0x0000, 0xff2d, - 0x0000, 0x0000, 0xff2b, 0x0000, 0x0000, 0xff2a, 0x0000, 0x0000, + 0x0000, 0x29fd, 0xff2b, 0x0000, 0x0000, 0xff2a, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x29e7, 0x0000, 0x0000, 0xff26, 0x0000, 0x0000, 0xff26, 0x0000, 0x0000, 0x0000, 0x0000, 0xff26, 0xffbb, 0xff27, 0xff27, 0xffb9, 0x0000, 0x0000, 0x0000, @@ -600,8 +661,8 @@ const WCHAR wine_casemap_upper[3582] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0082, 0x0082, + 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0x0082, 0x0082, 0x0082, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -613,7 +674,7 @@ const WCHAR wine_casemap_upper[3582] = 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe1, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffc0, 0xffc1, 0xffc1, 0x0000, 0xffc2, 0xffc7, 0x0000, 0x0000, 0x0000, - 0xffd1, 0xffca, 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffd1, 0xffca, 0xfff8, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0xffaa, 0xffb0, 0x0007, 0x0000, 0x0000, @@ -655,9 +716,9 @@ const WCHAR wine_casemap_upper[3582] = /* 0x0500 .. 0x05ff */ 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, - 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, + 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, + 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -686,7 +747,7 @@ const WCHAR wine_casemap_upper[3582] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x1d79 .. 0x1dff */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0ee6, 0x0000, 0x0000, 0x0000, + 0x8a04, 0x0000, 0x0000, 0x0000, 0x0ee6, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -735,7 +796,7 @@ const WCHAR wine_casemap_upper[3582] = 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, /* 0x1f00 .. 0x1fff */ 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -831,7 +892,7 @@ const WCHAR wine_casemap_upper[3582] = 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0xffd0, 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0xd5d5, 0xd5d8, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, @@ -846,8 +907,8 @@ const WCHAR wine_casemap_upper[3582] = 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x2d00 .. 0x2dff */ @@ -883,6 +944,60 @@ const WCHAR wine_casemap_upper[3582] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 0xa641 .. 0xa6ff */ + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 0xa723 .. 0xa7ff */ + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, + 0x0000, 0xffff, 0x0000, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, + 0xffff, 0x0000, 0xffff, 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, + 0x0000, 0xffff, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0xff41 .. 0xffff */ 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, 0xffe0, @@ -909,14 +1024,14 @@ const WCHAR wine_casemap_upper[3582] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }; -const WCHAR wine_digitmap[4619] = +const WCHAR wine_digitmap[5837] = { /* index */ 0x01d0, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x028a, 0x0384, 0x0100, 0x044e, 0x053e, 0x062e, 0x071e, 0x080e, 0x08be, 0x099e, - 0x0a5e, 0x0100, 0x0100, 0x0af5, 0x0100, 0x0100, 0x0100, 0x0b67, - 0x0c57, 0x0d11, 0x0100, 0x0deb, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0e7b, 0x0100, 0x0100, 0x0100, 0x0f1b, 0x0100, 0x0100, 0x101b, + 0x0a5e, 0x0100, 0x0100, 0x0af8, 0x0100, 0x0100, 0x0100, 0x0b6a, + 0x0c5a, 0x0d14, 0x0def, 0x0e9f, 0x0f5f, 0x0100, 0x0100, 0x0100, + 0x0fef, 0x0100, 0x0100, 0x0100, 0x108f, 0x0100, 0x0100, 0x118f, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, @@ -932,6 +1047,8 @@ const WCHAR wine_digitmap[4619] = 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x126f, 0x0100, + 0x129f, 0x139f, 0x1479, 0x14d3, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, @@ -941,9 +1058,7 @@ const WCHAR wine_digitmap[4619] = 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, - 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x110b, + 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x0100, 0x15cd, /* defaults */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -1276,6 +1391,8 @@ const WCHAR wine_digitmap[4619] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xefa0, 0xefa0, 0xefa0, 0xefa0, 0xefa0, 0xefa0, 0xefa0, 0xefa0, + 0xefa0, 0xefa0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -1288,11 +1405,9 @@ const WCHAR wine_digitmap[4619] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1369 .. 0x13ff */ - 0xecc8, 0xecc8, 0xecc8, 0xecc8, 0xecc8, 0xecc8, 0xecc8, 0xecc8, - 0xecc8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 0x1366 .. 0x13ff */ + 0x0000, 0x0000, 0x0000, 0xecc8, 0xecc8, 0xecc8, 0xecc8, 0xecc8, + 0xecc8, 0xecc8, 0xecc8, 0xecc8, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -1309,7 +1424,8 @@ const WCHAR wine_digitmap[4619] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, /* 0x178e .. 0x17ff */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -1376,20 +1492,69 @@ const WCHAR wine_digitmap[4619] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xe660, 0xe660, 0xe660, 0xe660, 0xe660, 0xe660, - 0xe660, 0xe660, 0xe660, 0xe660, 0x0000, 0x0000, 0x0000, 0x0000, + 0xe660, 0xe660, 0xe660, 0xe660, 0xe657, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0x1b26 .. 0x1bff */ + /* 0x1a25 .. 0x1aff */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, - 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0xe5b0, 0xe5b0, 0xe5b0, 0xe5b0, 0xe5b0, + 0xe5b0, 0xe5b0, 0xe5b0, 0xe5b0, 0xe5b0, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0xe5a0, 0xe5a0, 0xe5a0, 0xe5a0, 0xe5a0, + 0xe5a0, 0xe5a0, 0xe5a0, 0xe5a0, 0xe5a0, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, + /* 0x1b50 .. 0x1bff */ + 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, 0xe4e0, + 0xe4e0, 0xe4e0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xe480, 0xe480, 0xe480, 0xe480, 0xe480, 0xe480, 0xe480, 0xe480, + 0xe480, 0xe480, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 0x1c40 .. 0x1cff */ + 0xe3f0, 0xe3f0, 0xe3f0, 0xe3f0, 0xe3f0, 0xe3f0, 0xe3f0, 0xe3f0, + 0xe3f0, 0xe3f0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xe3e0, 0xe3e0, 0xe3e0, 0xe3e0, 0xe3e0, 0xe3e0, 0xe3e0, 0xe3e0, + 0xe3e0, 0xe3e0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -1410,7 +1575,6 @@ const WCHAR wine_digitmap[4619] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, /* 0x2070 .. 0x20ff */ 0xdfc0, 0x0000, 0x0000, 0x0000, 0xdfc0, 0xdfc0, 0xdfc0, 0xdfc0, 0xdfc0, 0xdfc0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -1484,9 +1648,121 @@ const WCHAR wine_digitmap[4619] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - /* 0xff10 .. 0xffff */ - 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, - 0x0120, 0x0120, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 0xa620 .. 0xa6ff */ + 0x5a10, 0x5a10, 0x5a10, 0x5a10, 0x5a10, 0x5a10, 0x5a10, 0x5a10, + 0x5a10, 0x5a10, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 0xa8d0 .. 0xa8ff */ + 0x5760, 0x5760, 0x5760, 0x5760, 0x5760, 0x5760, 0x5760, 0x5760, + 0x5760, 0x5760, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 0xa900 .. 0xa9ff */ + 0x5730, 0x5730, 0x5730, 0x5730, 0x5730, 0x5730, 0x5730, 0x5730, + 0x5730, 0x5730, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x5660, 0x5660, 0x5660, 0x5660, 0x5660, 0x5660, 0x5660, 0x5660, + 0x5660, 0x5660, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + /* 0xaa26 .. 0xaaff */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x55e0, 0x55e0, 0x55e0, 0x55e0, 0x55e0, 0x55e0, + 0x55e0, 0x55e0, 0x55e0, 0x55e0, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, + /* 0xaba6 .. 0xabff */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x5440, 0x5440, 0x5440, 0x5440, 0x5440, 0x5440, + 0x5440, 0x5440, 0x5440, 0x5440, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, + /* 0xff06 .. 0xffff */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, 0x0120, + 0x0120, 0x0120, 0x0120, 0x0120, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, @@ -1514,7 +1790,8 @@ const WCHAR wine_digitmap[4619] = 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000 }; const WCHAR wine_compatmap[1497] = { @@ -1631,7 +1908,7 @@ const WCHAR wine_compatmap[1497] = 0x7f06, 0x7f0c, 0x7f3b, 0x7f3b, 0x7fec, 0x802c, 0x816a, 0x839d, 0x83b1, 0x83e8, 0x8518, 0x85aa, 0x8791, 0x881c, 0x881b, 0x89f8, 0x8eb0, 0x8f35, 0x909f, 0x90d6, 0x926f, 0x92a3, 0x9550, 0x95d1, - 0x9c7b, 0x9d96, 0x9dd1, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x9c7b, 0x9d96, 0x9dd1, 0x660a, 0x4882, 0x87ab, 0x0000, 0x0000, 0x53b6, 0x5744, 0x56f6, 0x550d, 0x56d1, 0x570b, 0x5851, 0x5883, 0x5b25, 0x5adc, 0x5b1f, 0x5b67, 0x5dde, 0x5e36, 0x5ec6, 0x5ed5, 0x5fe2, 0x60a7, 0x6450, 0x6456, 0x64e5, 0x6528, 0x6652, 0x66c7, diff --git a/reactos/dll/win32/kernel32/winnls/string/chartype.c b/reactos/dll/win32/kernel32/winnls/string/chartype.c index d9ba86b4f17..12ce9c85fb0 100644 --- a/reactos/dll/win32/kernel32/winnls/string/chartype.c +++ b/reactos/dll/win32/kernel32/winnls/string/chartype.c @@ -1,2009 +1,2154 @@ -/* $Id$ - * - * KERNEL32.DLL locale functions - * - * Ported from Wine - * Copyright 1995 Martin von Loewis - * Copyright 1998 David Lee Lambert - * Copyright 2000 Julio César Gázquez - * Copyright 2002 Alexandre Julliard for CodeWeavers - * - */ +/* Unicode ctype tables */ +/* Automatically generated; DO NOT EDIT!! */ -#include +#include "wine/unicode.h" -#define NDEBUG -#include - -/* the character type contains the C1_* flags in the low 12 bits */ -/* and the C2_* type in the high 4 bits */ -#define GetCharType(Ch) (CharTypeTable[CharTypeTable[(Ch) >> 8] + ((Ch) & 0xff)]) - -static const unsigned short CharTypeTable[] = +const unsigned short wine_wctype_table[17152] = { /* offsets */ 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, 0x0900, 0x0a00, 0x0b00, 0x0c00, 0x0d00, 0x0e00, 0x0f00, 0x1000, - 0x1100, 0x1200, 0x1300, 0x1400, 0x1500, 0x1600, 0x1700, 0x1800, - 0x1900, 0x1a00, 0x0900, 0x0900, 0x0900, 0x1b00, 0x1c00, 0x1d00, - 0x1e00, 0x1f00, 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, - 0x2300, 0x2300, 0x2300, 0x2600, 0x0900, 0x0900, 0x2700, 0x2800, - 0x2900, 0x2a00, 0x2b00, 0x2c00, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x2d00, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x2e00, - 0x1600, 0x1600, 0x1600, 0x1600, 0x2f00, 0x0900, 0x0900, 0x0900, - 0x0900, 0x0900, 0x0900, 0x0900, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, - 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x1600, 0x3000, - 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, - 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, - 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, - 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, 0x3100, - 0x3100, 0x1600, 0x3200, 0x3300, 0x3400, 0x3500, 0x3600, 0x3700, + 0x1100, 0x1200, 0x1300, 0x1400, 0x1500, 0x1200, 0x1600, 0x1700, + 0x1800, 0x1900, 0x1a00, 0x1b00, 0x1c00, 0x1d00, 0x1e00, 0x1f00, + 0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2600, 0x2700, + 0x2800, 0x2900, 0x2500, 0x2a00, 0x2b00, 0x2c00, 0x2d00, 0x2e00, + 0x2f00, 0x3000, 0x3100, 0x3200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x3300, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x3400, + 0x1200, 0x1200, 0x1200, 0x1200, 0x3500, 0x1200, 0x3600, 0x3700, + 0x3800, 0x3900, 0x3a00, 0x3b00, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x3c00, + 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, + 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, + 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, + 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, 0x2800, + 0x2800, 0x1200, 0x3d00, 0x3e00, 0x3f00, 0x4000, 0x4100, 0x4200, /* values */ - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x9068, 0x8028, 0x9028, 0xa028, 0x8028, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x8020, 0x8020, 0x8020, 0x9020, - 0xa048, 0xb010, 0xb010, 0x5010, 0x5010, 0x5010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0x5010, 0x7010, 0x5010, 0x7010, 0x4010, - 0x3084, 0x3084, 0x3084, 0x3084, 0x3084, 0x3084, 0x3084, 0x3084, - 0x3084, 0x3084, 0x7010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0x1181, 0x1181, 0x1181, 0x1181, 0x1181, 0x1181, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0x1182, 0x1182, 0x1182, 0x1182, 0x1182, 0x1182, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0xb010, 0xb010, 0xb010, 0xb010, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x8020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - 0x7048, 0xb010, 0x5010, 0x5010, 0x5010, 0x5010, 0xb010, 0xb010, - 0xb010, 0xb010, 0x1102, 0xb010, 0xb010, 0xb000, 0xb010, 0xb010, - 0x5010, 0x5010, 0x3010, 0x3010, 0xb010, 0x1102, 0xb010, 0xb010, - 0xb010, 0x3010, 0x1102, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0xb010, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0xb010, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, - 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, - 0x1102, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1102, - 0x1102, 0x1101, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1101, - 0x1102, 0x1101, 0x1101, 0x1101, 0x1102, 0x1102, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1102, 0x1101, 0x1101, 0x1102, 0x1101, 0x1101, - 0x1101, 0x1102, 0x1102, 0x1102, 0x1101, 0x1101, 0x1102, 0x1101, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1101, - 0x1102, 0x1101, 0x1102, 0x1102, 0x1101, 0x1102, 0x1101, 0x1101, - 0x1102, 0x1101, 0x1101, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, - 0x1101, 0x1102, 0x1102, 0x1100, 0x1101, 0x1102, 0x1102, 0x1102, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1101, 0x1103, 0x1102, 0x1101, - 0x1103, 0x1102, 0x1101, 0x1103, 0x1102, 0x1101, 0x1102, 0x1101, - 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, - 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1102, 0x1101, 0x1103, 0x1102, 0x1101, 0x1102, 0x1101, 0x1101, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1102, 0x1102, 0x1102, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0xb010, 0xb010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x1010, 0x1010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x1010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0112, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0000, 0x0000, 0x0000, 0x0000, 0xb010, 0xb010, 0x0000, 0x0000, - 0x0000, 0x0000, 0x1010, 0x0000, 0x0000, 0x0000, 0xb010, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xb010, 0xb010, 0x1101, 0xb010, - 0x1101, 0x1101, 0x1101, 0x0000, 0x1101, 0x0000, 0x1101, 0x1101, - 0x1102, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x0000, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x0000, - 0x1102, 0x1102, 0x1101, 0x1101, 0x1101, 0x1102, 0x1102, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1101, 0x1102, 0xb010, 0x1101, - 0x1102, 0x1101, 0x1101, 0x1102, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0000, - 0x0010, 0x0010, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, - 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x0000, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x0000, 0x0000, - 0x1101, 0x1102, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x0000, - 0x0000, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x0000, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x0000, 0x1010, 0xb010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0000, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0000, 0x0010, 0x0010, 0x0010, 0x2010, 0x0010, - 0x2010, 0x0010, 0x0010, 0x2010, 0x0010, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2100, 0x2100, 0x2100, 0x2010, 0x2010, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2000, 0x2000, 0x2000, 0x2000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x7010, 0x2010, 0xb010, 0xb010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x2010, 0x0000, 0x0000, 0x0000, 0x2010, - 0x0000, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2010, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x6004, 0x6004, 0x6004, 0x6004, 0x6004, 0x6004, 0x6004, 0x6004, - 0x6004, 0x6004, 0x5010, 0x6010, 0x6010, 0x2010, 0x2100, 0x2100, - 0x0010, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2010, 0x2100, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x2000, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x2010, 0x2010, 0x0010, - 0x0010, 0xb010, 0x0010, 0x0010, 0x0010, 0x0010, 0x2100, 0x2100, - 0x3004, 0x3004, 0x3004, 0x3004, 0x3004, 0x3004, 0x3004, 0x3004, - 0x3004, 0x3004, 0x2100, 0x2100, 0x2100, 0x2010, 0x2010, 0x2100, - 0x2010, 0x2010, 0x2010, 0x2010, 0x2010, 0x2010, 0x2010, 0x2010, - 0x2010, 0x2010, 0x2010, 0x2010, 0x2010, 0x2010, 0x0000, 0x0000, - 0x2100, 0x0010, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, 0x2100, 0x2100, 0x2100, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x2100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0010, 0x0010, 0x1010, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0010, 0x1100, 0x1010, 0x1010, - 0x1010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x1010, 0x1010, 0x1010, 0x1010, 0x0010, 0x0000, 0x0000, - 0x1100, 0x0010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0010, 0x0010, 0x1010, 0x1010, 0x1004, 0x1004, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x1010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0010, 0x1010, 0x1010, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x1100, - 0x1100, 0x0000, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x0000, 0x0000, 0x0000, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0010, 0x1100, 0x1010, 0x1010, - 0x1010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, 0x1010, - 0x1010, 0x0000, 0x0000, 0x1010, 0x1010, 0x0010, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1010, - 0x0000, 0x0000, 0x0000, 0x0000, 0x1100, 0x1100, 0x0000, 0x1100, - 0x1100, 0x1100, 0x0010, 0x0010, 0x0000, 0x0000, 0x1004, 0x1004, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x1100, 0x1100, 0x5010, 0x5010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0010, 0x0010, 0x1010, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x1100, - 0x1100, 0x0000, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, 0x0000, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0010, 0x0000, 0x1010, 0x1010, - 0x1010, 0x0010, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0010, - 0x0010, 0x0000, 0x0000, 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x1100, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1004, 0x1004, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x0010, 0x0010, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0010, 0x0010, 0x1010, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x1100, - 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0010, 0x1100, 0x1010, 0x1010, - 0x1010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0010, - 0x0010, 0x1010, 0x0000, 0x1010, 0x1010, 0x0010, 0x0000, 0x0000, - 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x0010, 0x0010, 0x0000, 0x0000, 0x1004, 0x1004, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x0000, 0x5010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0010, 0x1010, 0x1010, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x1100, - 0x1100, 0x0000, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0010, 0x1100, 0x1010, 0x0010, - 0x1010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, 0x0000, 0x1010, - 0x1010, 0x0000, 0x0000, 0x1010, 0x1010, 0x0010, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0010, 0x1010, - 0x0000, 0x0000, 0x0000, 0x0000, 0x1100, 0x1100, 0x0000, 0x1100, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x1004, 0x1004, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x1010, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0010, 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, - 0x0000, 0x1100, 0x1100, 0x0000, 0x1100, 0x0000, 0x1100, 0x1100, - 0x0000, 0x0000, 0x0000, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x1100, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x1010, 0x1010, - 0x0010, 0x1010, 0x1010, 0x0000, 0x0000, 0x0000, 0x1010, 0x1010, - 0x1010, 0x0000, 0x1010, 0x1010, 0x1010, 0x0010, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1010, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1004, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x1010, 0x1010, 0x1010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0x5010, 0xb010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1010, 0x1010, 0x1010, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0010, 0x0010, - 0x0010, 0x1010, 0x1010, 0x1010, 0x1010, 0x0000, 0x0010, 0x0010, - 0x0010, 0x0000, 0x0010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0010, 0x0010, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x1004, 0x1004, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x1010, 0x1010, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0010, 0x1100, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x0000, 0x1010, 0x1010, - 0x1010, 0x0000, 0x1010, 0x1010, 0x0010, 0x0010, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1010, 0x1010, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1100, 0x0000, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x1004, 0x1004, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x1010, 0x1010, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x1010, 0x1010, - 0x1010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, 0x1010, 0x1010, - 0x1010, 0x0000, 0x1010, 0x1010, 0x1010, 0x0010, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1010, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x1004, 0x1004, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x1010, 0x1010, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x0000, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x1100, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x0000, 0x0000, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, 0x1010, - 0x1010, 0x1010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0010, 0x0000, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x1010, 0x1010, 0x1010, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0010, 0x1100, 0x1100, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, 0x5010, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x1010, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x1004, 0x1004, 0x1010, 0x1010, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1100, 0x1100, 0x0000, 0x1100, 0x0000, 0x0000, 0x1100, - 0x1100, 0x0000, 0x1100, 0x0000, 0x0000, 0x1100, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, - 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x0000, 0x1100, 0x1100, 0x1100, 0x0000, 0x1100, 0x0000, 0x1100, - 0x0000, 0x0000, 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0010, 0x1100, 0x1100, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0000, 0x0010, 0x0010, 0x1100, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x1010, 0x0000, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x1004, 0x1004, 0x0000, 0x0000, 0x1100, 0x1100, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x0010, 0x0010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x1004, 0x1004, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x0010, 0x1010, 0x0010, - 0x1010, 0x0010, 0xb010, 0xb010, 0xb010, 0xb010, 0x1010, 0x1010, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x1010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x1010, 0x0010, 0x0010, - 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0000, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0000, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x0010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x0000, 0x0000, 0x1010, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x0000, 0x1100, 0x1100, 0x0000, 0x1010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x1010, 0x0010, 0x0000, 0x0000, 0x0000, 0x0010, 0x0010, - 0x1010, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x1004, 0x1004, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1010, 0x1010, - 0x0010, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0000, 0x0000, 0x1010, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x1100, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x1004, 0x1004, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1010, 0x1010, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xa008, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0xb010, 0xb010, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0010, 0x0010, 0x0010, 0x1010, 0x1010, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x0010, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x1100, 0x1100, - 0x1100, 0x0000, 0x0010, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1000, 0x1000, 0x1010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x0010, 0x1010, - 0x1010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x5010, 0x1100, 0x0010, 0x0000, 0x0000, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x1004, 0x1004, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0x0010, 0x0010, 0x0010, 0xa008, 0x0000, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x1004, 0x1004, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1010, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, - 0x0010, 0x0010, 0x0010, 0x1010, 0x1010, 0x1010, 0x1010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1010, 0x1010, 0x0010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0x0000, 0x0000, 0x0000, 0xb010, 0xb010, 0x1004, 0x1004, - 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, 0x1004, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, 0x1101, 0x1102, - 0x1101, 0x1102, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x0000, 0x0000, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x0000, 0x0000, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x0000, 0x0000, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x0000, 0x0000, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x0000, 0x1101, 0x0000, 0x1101, 0x0000, 0x1101, 0x0000, 0x1101, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x0000, 0x0000, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x0000, 0x1102, 0x1102, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0xb010, 0x1102, 0xb010, - 0xb010, 0xb010, 0x1102, 0x1102, 0x1102, 0x0000, 0x1102, 0x1102, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0xb010, 0xb010, 0xb010, - 0x1102, 0x1102, 0x1102, 0x1102, 0x0000, 0x0000, 0x1102, 0x1102, - 0x1101, 0x1101, 0x1101, 0x1101, 0x0000, 0xb010, 0xb010, 0xb010, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0xb010, 0xb010, 0xb010, - 0x0000, 0x0000, 0x1102, 0x1102, 0x1102, 0x0000, 0x1102, 0x1102, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0xb010, 0xb010, 0x0000, - 0xa008, 0xa008, 0xa008, 0xa008, 0xa008, 0xa008, 0xa008, 0xa008, - 0xa008, 0xa008, 0xa008, 0x0008, 0x0000, 0x0000, 0x1000, 0x2000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xa000, 0x8000, 0xb000, 0xb000, 0xb000, 0xb000, 0xb000, 0xa008, - 0x5010, 0x5010, 0x5010, 0x5010, 0x5010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, 0x0000, 0xb010, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xa008, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x3010, 0x1102, 0x0000, 0x0000, 0x3010, 0x3010, 0x3010, 0x3010, - 0x3010, 0x3010, 0x5010, 0x5010, 0xb010, 0xb010, 0xb010, 0x1102, - 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, - 0x3010, 0x3010, 0x5010, 0x5010, 0xb010, 0xb010, 0xb010, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x5010, 0x5010, 0x5010, 0x5010, 0x5010, 0x5010, 0x5010, 0x5010, - 0x5010, 0x5010, 0x5010, 0x5010, 0x5010, 0x5010, 0x5010, 0x5010, - 0x5010, 0x5010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0x1101, 0xb010, 0xb010, 0xb010, 0xb010, 0x1101, - 0xb010, 0xb010, 0x1102, 0x1101, 0x1101, 0x1101, 0x1102, 0x1102, - 0x1101, 0x1101, 0x1101, 0x1102, 0xb010, 0x1101, 0xb010, 0xb010, - 0xb010, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0x1101, 0xb010, 0x1101, 0xb010, - 0x1101, 0xb010, 0x1101, 0x1101, 0x1101, 0x1101, 0x5010, 0x1102, - 0x1101, 0x1101, 0xb010, 0x1101, 0x1102, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1102, 0xb010, 0xb010, 0x0000, 0x1102, 0x1101, 0x1101, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x1101, 0x1102, 0x1102, - 0x1102, 0x1102, 0xb010, 0xb010, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, - 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, - 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, - 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, - 0x1010, 0x1010, 0x1010, 0x1010, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0x5010, 0x5010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x1010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, - 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, - 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, - 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, - 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, - 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, - 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, 0x3010, - 0x3010, 0x3010, 0x3010, 0x3010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1111, 0x1111, - 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, - 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, - 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, 0x1111, - 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, - 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, - 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, 0x1112, - 0x1112, 0x1112, 0x3010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x0000, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, 0xb010, 0xb010, - 0xb010, 0xb010, 0x0000, 0x0000, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x0000, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, 0xb010, 0x0000, 0xb010, - 0xb010, 0xb010, 0xb010, 0x0000, 0x0000, 0x0000, 0xb010, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, - 0x0000, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x0000, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0x0000, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, 0x0000, 0x0000, 0x0000, - 0xa008, 0xb010, 0xb010, 0xb010, 0xb010, 0x1010, 0x1100, 0x1010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0xb010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0xb010, 0xb010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1100, 0xb010, 0xb010, 0xb010, - 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x0000, 0x0010, 0x0010, 0xb010, 0xb010, 0x1010, 0x1010, 0x1100, - 0xb010, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0xb010, 0x1010, 0x1010, 0x1010, 0x1100, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, - 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0xb010, 0xb010, 0x0000, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0xb010, 0xb010, 0x0000, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x0000, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0xb010, - 0xb010, 0xb010, 0xb010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0xb010, 0xb010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, - 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0x1010, 0xb010, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, 0x1000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2100, 0x0010, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x5010, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x0000, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x0000, 0x2100, 0x0000, - 0x2100, 0x2100, 0x0000, 0x2100, 0x2100, 0x0000, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0xb010, 0xb010, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x0000, 0x0000, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2010, 0xb010, 0x0000, 0x0000, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0x7010, 0xb010, 0x7010, 0x0000, 0xb010, 0x7010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x5010, - 0xb010, 0xb010, 0x5010, 0x5010, 0xb010, 0xb010, 0xb010, 0x0000, - 0xb010, 0x5010, 0x5010, 0xb010, 0x0000, 0x0000, 0x0000, 0x0000, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x0000, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, - 0x2100, 0x2100, 0x2100, 0x2100, 0x2100, 0x0000, 0x0000, 0x0048, - 0x0000, 0xb010, 0xb010, 0x5010, 0x5010, 0x5010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0x5010, 0x7010, 0x5010, 0x7010, 0x4010, - 0x3084, 0x3084, 0x3084, 0x3084, 0x3084, 0x3084, 0x3084, 0x3084, - 0x3084, 0x3084, 0x7010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0x1181, 0x1181, 0x1181, 0x1181, 0x1181, 0x1181, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, 0x1101, - 0x1101, 0x1101, 0x1101, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0x1182, 0x1182, 0x1182, 0x1182, 0x1182, 0x1182, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, 0x1102, - 0x1102, 0x1102, 0x1102, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1010, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1010, 0x1010, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x0000, - 0x0000, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x0000, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x0000, 0x0000, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, 0x1100, - 0x0000, 0x0000, 0x1100, 0x1100, 0x1100, 0x0000, 0x0000, 0x0000, - 0x5010, 0x5010, 0xb010, 0xb010, 0xb010, 0x5010, 0x5010, 0x0000, - 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0xb010, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0000, 0xb010, 0xb010, 0x0000, 0x0000 + 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, + 0xe220, 0x9268, 0x8228, 0x9228, 0xa228, 0x8228, 0xe220, 0xe220, + 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, + 0xe220, 0xe220, 0xe220, 0xe220, 0x8220, 0x8220, 0x8220, 0x9220, + 0xa248, 0xb210, 0xb210, 0x5210, 0x5210, 0x5210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0x4210, 0x7210, 0x4210, 0x7210, 0x7210, + 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, + 0x3284, 0x3284, 0x7210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0x1381, 0x1381, 0x1381, 0x1381, 0x1381, 0x1381, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0x1382, 0x1382, 0x1382, 0x1382, 0x1382, 0x1382, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0xb210, 0xb210, 0xb210, 0xb210, 0xe220, + 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0x8228, 0xe220, 0xe220, + 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, + 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, + 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, + 0x7248, 0xb210, 0x5210, 0x5210, 0x5210, 0x5210, 0xb210, 0xb210, + 0xb210, 0xb210, 0x1312, 0xb210, 0xb210, 0xe230, 0xb210, 0xb210, + 0x5210, 0x5210, 0x3214, 0x3214, 0xb210, 0x1312, 0xb210, 0xb210, + 0xb210, 0x3214, 0x1312, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0xb210, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0xb210, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, + 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, + 0x1302, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, + 0x1302, 0x1301, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, + 0x1302, 0x1301, 0x1301, 0x1301, 0x1302, 0x1302, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1302, 0x1301, 0x1301, 0x1302, 0x1301, 0x1301, + 0x1301, 0x1302, 0x1302, 0x1302, 0x1301, 0x1301, 0x1302, 0x1301, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, + 0x1302, 0x1301, 0x1302, 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, + 0x1302, 0x1301, 0x1301, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, + 0x1301, 0x1302, 0x1302, 0x1300, 0x1301, 0x1302, 0x1302, 0x1302, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1301, 0x1303, 0x1302, 0x1301, + 0x1303, 0x1302, 0x1301, 0x1303, 0x1302, 0x1301, 0x1302, 0x1301, + 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, + 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1302, 0x1301, 0x1303, 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1301, 0x1301, 0x1302, 0x1301, 0x1301, 0x1302, + 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, 0x1301, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1300, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0xb300, 0xb300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0xb200, 0xb200, 0xb200, 0xb200, 0xb300, 0xb300, + 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, + 0x1300, 0x1300, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb300, 0xb200, 0x1300, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0x1301, 0x1302, 0x1301, 0x1302, 0xb300, 0xb200, 0x1301, 0x1302, + 0x0000, 0x0000, 0x1300, 0x1302, 0x1302, 0x1302, 0xb210, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0xb200, 0xb200, 0x1301, 0xb210, + 0x1301, 0x1301, 0x1301, 0x0000, 0x1301, 0x0000, 0x1301, 0x1301, + 0x1302, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x0000, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1301, + 0x1302, 0x1302, 0x1301, 0x1301, 0x1301, 0x1302, 0x1302, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1301, 0x1302, 0xb200, 0x1301, + 0x1302, 0x1301, 0x1301, 0x1302, 0x1302, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, + 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x0000, + 0x0000, 0x1300, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, + 0x0000, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x0000, 0x1210, 0xb210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x2210, 0xd200, + 0x2210, 0xd200, 0xd200, 0x2210, 0xd200, 0xd200, 0x2210, 0xd200, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0x2300, 0x2300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x2300, 0x2300, 0x2300, 0x2210, 0x2210, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x6220, 0x6220, 0x6220, 0x6220, 0x0000, 0x0000, 0xb200, 0xb200, + 0xc200, 0x5210, 0x5210, 0xc200, 0x7210, 0xc210, 0xb200, 0xb200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xc210, 0x0000, 0x0000, 0xc210, 0xc210, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0x6204, 0x6204, 0x6204, 0x6204, 0x6204, 0x6204, 0x6204, 0x6204, + 0x6204, 0x6204, 0x5210, 0x6210, 0x6210, 0xc210, 0xc300, 0xc300, + 0xd200, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc210, 0xc300, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x6220, 0xb200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xc300, 0xc300, 0xd200, + 0xd200, 0xb200, 0xd200, 0xd200, 0xd200, 0xd200, 0xc300, 0xc300, + 0x3204, 0x3204, 0x3204, 0x3204, 0x3204, 0x3204, 0x3204, 0x3204, + 0x3204, 0x3204, 0xc300, 0xc300, 0xc300, 0xc200, 0xc200, 0xc300, + 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, + 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, 0xc210, 0x0000, 0x6220, + 0xc300, 0xd200, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xc300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x2204, 0x2204, 0x2204, 0x2204, 0x2204, 0x2204, 0x2204, 0x2204, + 0x2204, 0x2204, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0x2300, 0x2300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0x2300, 0x2300, 0xb200, 0xb210, + 0xb210, 0xb210, 0x2300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0xd200, 0xd200, + 0xd200, 0xd200, 0x2300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0x2300, 0xd200, 0xd200, 0xd200, + 0x2300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, + 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, + 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, 0x2210, 0x0000, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0x2210, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xd200, 0xd200, 0xd200, 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0xd200, 0x1200, 0xd200, 0x1300, 0x1200, 0x1200, + 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0x1200, 0x1200, + 0x1300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0xd200, 0xd200, 0x1210, 0x1210, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1210, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x0000, 0xd200, 0x1200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x1300, + 0x1300, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, + 0x1300, 0x1300, 0x0000, 0x0000, 0xd200, 0x1300, 0x1200, 0x1200, + 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0x1200, + 0x1200, 0x0000, 0x0000, 0x1200, 0x1200, 0xd200, 0x1300, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, + 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, + 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1300, 0x1300, 0x5200, 0x5200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x5200, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0xd200, 0xd200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, + 0x1300, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x0000, + 0x1300, 0x1300, 0x0000, 0x0000, 0xd200, 0x0000, 0x1200, 0x1200, + 0x1200, 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, 0xd200, + 0xd200, 0x0000, 0x0000, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, + 0x0000, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0xd200, 0xd200, 0x1300, 0x1300, 0x1300, 0xd200, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0xd200, 0xd200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, + 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x0000, 0x0000, 0xd200, 0x1300, 0x1200, 0x1200, + 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0xd200, + 0xd200, 0x1200, 0x0000, 0x1200, 0x1200, 0xd200, 0x0000, 0x0000, + 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x0000, 0x5200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0xd200, 0x1200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x1300, + 0x1300, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x0000, 0x0000, 0xd200, 0x1300, 0x1200, 0xd200, + 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0x1200, + 0x1200, 0x0000, 0x0000, 0x1200, 0x1200, 0xd200, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xd200, 0x1200, + 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, + 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1200, 0x1300, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0xd200, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, 0x0000, 0x1300, 0x1300, + 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, 0x1200, + 0xd200, 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, 0x1200, 0x1200, + 0x1200, 0x0000, 0x1200, 0x1200, 0x1200, 0xd200, 0x0000, 0x0000, + 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1200, 0x1200, 0x1200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0x5200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x1200, 0x1200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x1300, 0xd200, 0xd200, + 0xd200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, 0xd200, 0xd200, + 0xd200, 0x0000, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xd200, 0xd200, 0x0000, + 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x1200, + 0x0000, 0x0000, 0x1200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x0000, 0x0000, 0xd200, 0x1300, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, 0x1200, 0x1200, + 0x1200, 0x0000, 0x1200, 0x1200, 0xd200, 0xd200, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, 0x1200, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x0000, + 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x0000, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x1200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x1300, 0x1200, 0x1200, + 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x1200, 0x1200, + 0x1200, 0x0000, 0x1200, 0x1200, 0x1200, 0xd200, 0x1300, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, 0x0000, + 0x0000, 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x0000, 0x0000, 0x1200, 0x1200, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x0000, 0x0000, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, 0x1200, + 0x1200, 0x1200, 0xd200, 0xd200, 0xd200, 0x0000, 0xd200, 0x0000, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x1200, 0x1200, 0x1210, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0xd200, 0x1300, 0x1300, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, 0x5200, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1210, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1210, 0x1210, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, 0x0000, 0x0000, 0x1300, + 0x1300, 0x0000, 0x1300, 0x0000, 0x0000, 0x1300, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, + 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x0000, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x0000, 0x1300, + 0x0000, 0x0000, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0xd200, 0x1300, 0x1300, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0x0000, 0xd200, 0xd200, 0x1300, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x0000, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x0000, 0x0000, 0x1300, 0x1300, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1200, 0x1200, 0x1200, 0x1210, 0x1210, 0x1210, 0x1210, + 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, + 0x1210, 0x1210, 0x1210, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0xd200, 0xd200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0x1200, 0xd200, + 0x1200, 0xd200, 0xb210, 0xb210, 0xb210, 0xb210, 0x1200, 0x1200, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, + 0x0000, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1210, 0xd200, 0xd200, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0x0000, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, 0x1200, 0x1200, + 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1210, 0x1210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1200, 0x1200, 0xd200, 0xd200, 0xd200, + 0xd200, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0x1200, 0xd200, 0xd200, 0x1200, 0x1200, 0xd200, 0xd200, 0x1300, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1200, 0x1200, + 0xd200, 0xd200, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0xd200, + 0xd200, 0x1300, 0x1200, 0x1200, 0x1200, 0x1300, 0x1300, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1300, 0x1300, + 0x1300, 0xd200, 0xd200, 0xd200, 0xd200, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0xd200, 0x1200, 0x1200, 0xd200, 0xd200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0x1300, 0x1200, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1200, 0x1200, 0x1200, 0xd200, 0x1200, 0x1200, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1210, 0x1300, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0xd200, 0xd200, 0xd200, + 0x1200, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, + 0x1210, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb210, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1210, 0x1210, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0xa208, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0xb210, 0xb210, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1210, 0x1210, 0x1210, 0x1300, 0x1300, + 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, + 0x1300, 0x1300, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0xd200, 0xd200, 0xd200, 0x1210, 0x1210, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x1300, 0x1300, + 0x1300, 0x0000, 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1220, 0x1220, 0x1200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0x1200, + 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0x1210, 0x1210, 0x1210, 0x1300, + 0x1210, 0x1210, 0x1210, 0x5200, 0x1300, 0xd200, 0x0000, 0x0000, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xd200, 0xd200, 0xd200, 0xa208, 0x0000, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0xd200, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, + 0xd200, 0xd200, 0xd200, 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, + 0xd200, 0x1200, 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1200, 0x1200, 0xd200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0x0000, 0x0000, 0x0000, 0xb210, 0xb210, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1200, 0x0000, 0x0000, 0x0000, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, + 0xd200, 0x1200, 0x1200, 0x1200, 0x0000, 0x0000, 0x1210, 0x1210, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1200, 0xd200, 0x1200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, + 0xd200, 0x1200, 0xd200, 0x1200, 0x1200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, 0x0000, 0xd200, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1300, + 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0x1200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0x1200, 0xd200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0xd200, 0x1200, 0x1200, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, + 0x1210, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, + 0xd200, 0xd200, 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, 0x1200, + 0xd200, 0xd200, 0x1200, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0x1200, + 0xd200, 0xd200, 0x1200, 0x1200, 0x1200, 0xd200, 0x1200, 0xd200, + 0xd200, 0xd200, 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x1210, 0x1210, 0x1210, 0x1210, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, 0x1200, 0xd200, 0xd200, + 0x0000, 0x0000, 0x0000, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1210, 0x1210, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xd200, 0xd200, 0xd200, 0x1210, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0x1200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1300, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0xd200, 0xd200, 0xd200, 0xd200, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, 0x0000, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x0000, 0x0000, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, 0x0000, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x0000, 0x0000, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x0000, 0x1301, 0x0000, 0x1301, 0x0000, 0x1301, 0x0000, 0x1301, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, 0x0000, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, 0x1303, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, 0x1302, 0x1302, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1303, 0xb200, 0x1302, 0xb200, + 0xb200, 0xb200, 0x1302, 0x1302, 0x1302, 0x0000, 0x1302, 0x1302, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1303, 0xb200, 0xb200, 0xb200, + 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, 0x0000, 0x1302, 0x1302, + 0x1301, 0x1301, 0x1301, 0x1301, 0x0000, 0xb200, 0xb200, 0xb200, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0xb200, 0xb200, 0xb200, + 0x0000, 0x0000, 0x1302, 0x1302, 0x1302, 0x0000, 0x1302, 0x1302, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1303, 0xb200, 0xb200, 0x0000, + 0xa208, 0xa208, 0xa208, 0xa208, 0xa208, 0xa208, 0xa208, 0xa208, + 0xa208, 0xa208, 0xa208, 0xe220, 0xe220, 0xe220, 0x1220, 0x2220, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xa208, 0x8208, 0xf220, 0xf220, 0xf220, 0xf220, 0xf220, 0x7208, + 0x5210, 0x5210, 0x5210, 0x5210, 0x5210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0x7200, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb200, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xa208, + 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, + 0x3200, 0x1302, 0x0000, 0x0000, 0x3200, 0x3200, 0x3200, 0x3200, + 0x3200, 0x3200, 0x4200, 0x4200, 0xb200, 0xb210, 0xb210, 0x1302, + 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, + 0x3200, 0x3200, 0x4200, 0x4200, 0xb200, 0xb210, 0xb210, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, + 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, + 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, + 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, 0x5200, + 0x5200, 0x5200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0x1301, 0xb200, 0xb200, 0xb200, 0xb200, 0x1301, + 0xb200, 0xb200, 0x1302, 0x1301, 0x1301, 0x1301, 0x1302, 0x1302, + 0x1301, 0x1301, 0x1301, 0x1302, 0xb200, 0x1301, 0xb200, 0xb200, + 0xb200, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0x1301, 0xb200, 0x1301, 0xb200, + 0x1301, 0xb200, 0x1301, 0x1301, 0x1301, 0x1301, 0x5200, 0x1302, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1302, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1302, 0xb200, 0xb200, 0x1302, 0x1302, 0x1301, 0x1301, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x1301, 0x1302, 0x1302, + 0x1302, 0x1302, 0xb200, 0xb200, 0xb200, 0xb200, 0x1302, 0x1200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1301, 0x1302, 0x1300, 0x1300, 0x1300, + 0x1300, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0x4200, 0x5200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb210, 0xb210, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x1200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, + 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, 0x3200, + 0x3200, 0x3200, 0x3200, 0x3200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0x1200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0x0000, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb210, 0xb210, 0xb200, + 0xb200, 0xb200, 0xb200, 0x0000, 0xb200, 0x0000, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb210, 0xb210, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x0000, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, + 0x1301, 0x1302, 0x1301, 0x1301, 0x1301, 0x1302, 0x1302, 0x1301, + 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, 0x1301, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1300, 0x1301, 0x1301, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1302, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0x1301, 0x1302, 0x1301, 0x1302, 0xd200, + 0xd200, 0xd200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0xb210, 0xb210, 0xb210, 0xb210, 0xb200, 0xb210, 0xb210, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, + 0x1210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xd200, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb300, + 0xb210, 0xb210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0x0000, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, + 0xa248, 0xb210, 0xb210, 0xb210, 0xb200, 0x1300, 0x1300, 0x1300, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb200, 0xb200, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xb210, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xb200, 0xb200, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xb210, 0xb200, 0xb200, + 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x0000, 0xd200, 0xd200, 0xb200, 0xb200, 0x1300, 0x1300, 0x1300, + 0xb210, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0xb210, 0x1300, 0x1300, 0x1300, 0x1300, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xb200, 0xb200, 0x0000, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0xb200, 0xb200, 0xb200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0xb200, 0xb200, 0xb200, 0xb200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x0000, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xb200, + 0xb200, 0xb200, 0xb200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xb200, 0xb200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0xb200, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1210, 0x1210, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xb210, 0xb210, 0xb210, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1300, 0xd200, + 0xd200, 0xd200, 0xd200, 0xb210, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0xd200, 0xd200, 0xb210, 0xb300, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0xd200, 0xd200, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb300, + 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, 0xb300, + 0xb200, 0xb200, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1302, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1300, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1301, 0x1302, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0xb300, 0x1200, 0x1200, 0x1301, 0x1302, 0x1301, 0x1302, 0x0000, + 0x1301, 0x1302, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, 0x1301, 0x1302, + 0x1301, 0x1302, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x1302, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0xd200, 0x1300, 0x1300, 0x1300, 0xd200, 0x1300, + 0x1300, 0x1300, 0x1300, 0xd200, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1200, 0x1200, 0xd200, 0xd200, 0x1200, + 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x5200, 0x5200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0xb210, 0xb210, 0xb210, 0xb210, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1200, 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1200, 0x1200, 0x1200, 0xd200, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1210, 0x1210, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1210, 0x1210, 0x1210, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1210, 0x1210, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0x1200, 0x1200, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1210, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, + 0xd200, 0xd200, 0xd200, 0x1200, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0xd200, 0x1200, 0x1200, 0xd200, 0xd200, + 0xd200, 0xd200, 0x1200, 0x1200, 0xd200, 0x1200, 0x1200, 0x1200, + 0x1200, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, + 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x1210, 0x0000, 0x1300, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x1210, 0x1210, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x1200, + 0x1200, 0xd200, 0xd200, 0x1200, 0x1200, 0xd200, 0xd200, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0xd200, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0x1200, 0x0000, 0x0000, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x0000, 0x0000, 0x1210, 0x1210, 0x1210, 0x1210, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1200, + 0x1200, 0x1200, 0x1300, 0x1200, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0xd200, 0x1300, 0xd200, 0xd200, 0xd200, 0x1300, 0x1300, 0xd200, + 0xd200, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0xd200, 0xd200, + 0x1300, 0xd200, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1210, 0x1210, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1200, 0x1200, 0xd200, 0x1200, 0x1200, + 0xd200, 0x1200, 0x1200, 0x1210, 0x1200, 0xd200, 0x0000, 0x0000, + 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, 0x1204, + 0x1204, 0x1204, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x0000, 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2300, 0xd200, 0x2300, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0x4200, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x0000, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x0000, 0x2300, 0x0000, + 0x2300, 0x2300, 0x0000, 0x2300, 0x2300, 0x0000, 0x2300, 0x2300, + 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, 0x2300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc200, 0xc200, 0xc200, 0xc200, 0xc200, 0xc200, + 0xc200, 0xc200, 0xc200, 0xc200, 0xc200, 0xc200, 0xc200, 0xc200, + 0xc200, 0xc200, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xb210, 0xb210, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0x0000, 0x0000, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc200, 0xb200, 0x0000, 0x0000, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0xd200, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, + 0x7210, 0xb210, 0x7210, 0x0000, 0xb210, 0x7210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0x5210, + 0xb210, 0xb210, 0x4200, 0x4210, 0xb200, 0xb200, 0xb200, 0x0000, + 0xb210, 0x5200, 0x5210, 0xb210, 0x0000, 0x0000, 0x0000, 0x0000, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0x0000, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, + 0xc300, 0xc300, 0xc300, 0xc300, 0xc300, 0x0000, 0x0000, 0xe260, + 0x0000, 0xb210, 0xb210, 0x5210, 0x5200, 0x5210, 0xb210, 0xb210, + 0xb210, 0xb210, 0xb210, 0x4200, 0x7210, 0x4210, 0x7210, 0x7210, + 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, 0x3284, + 0x3284, 0x3284, 0x7210, 0xb210, 0xb200, 0xb200, 0xb200, 0xb210, + 0xb210, 0x1381, 0x1381, 0x1381, 0x1381, 0x1381, 0x1381, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, 0x1301, + 0x1301, 0x1301, 0x1301, 0xb210, 0xb210, 0xb210, 0xb200, 0xb210, + 0xb200, 0x1382, 0x1382, 0x1382, 0x1382, 0x1382, 0x1382, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, 0x1302, + 0x1302, 0x1302, 0x1302, 0xb210, 0xb200, 0xb210, 0xb200, 0xb210, + 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x0000, + 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, 0x1300, + 0x0000, 0x0000, 0x1300, 0x1300, 0x1300, 0x0000, 0x0000, 0x0000, + 0x5200, 0x5200, 0xb200, 0xb200, 0xb200, 0x5200, 0x5200, 0x0000, + 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0xb200, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0xb220, 0xb220, 0xb220, 0xb200, 0xb200, 0x0000, 0x0000 }; - -/* - * @implemented - */ -BOOL -WINAPI -GetStringTypeExW ( - LCID Locale, - DWORD InfoType, - LPCWSTR Src, - int Count, - LPWORD CharType - ) -{ - /* locale is ignored for Unicode */ - return GetStringTypeW(InfoType, Src, Count, CharType); -} - - -/* - * @implemented - */ -BOOL -WINAPI -GetStringTypeExA ( - LCID Locale, - DWORD InfoType, - LPCSTR Src, - int Count, - LPWORD CharType - ) -{ - return GetStringTypeA(Locale, InfoType, Src, Count, CharType); -} - - -/* - * @implemented - */ -BOOL -WINAPI -GetStringTypeW ( - DWORD InfoType, - LPCWSTR Src, - int Count, - LPWORD CharType - ) -{ - static struct - { - int RangeStart; - int RangeEnd; - WORD Type3; - } - Type3Construct[] = - { - { 0x0600, 0x06FF, C3_KASHIDA }, - { 0x3000, 0x303F, C3_SYMBOL }, - { 0x3040, 0x309F, C3_HIRAGANA }, - { 0x30A0, 0x30FF, C3_KATAKANA }, - { 0x4E00, 0x9FAF, C3_IDEOGRAPH }, - { 0xFF00, 0xFF60, C3_FULLWIDTH }, - { 0xFF00, 0xFF20, C3_SYMBOL }, - { 0xFF21, 0xFF3A, C3_ALPHA }, - { 0xFF41, 0xFF5A, C3_ALPHA }, - { 0xFF3B, 0xFF40, C3_SYMBOL }, - { 0xFF5B, 0xFF60, C3_SYMBOL }, - { 0xFF61, 0xFFDC, C3_HALFWIDTH }, - { 0xFF61, 0xFF64, C3_SYMBOL }, - { 0xFF65, 0xFF9F, C3_KATAKANA }, - { 0xFF65, 0xFF9F, C3_ALPHA }, - { 0xFFE0, 0xFFE6, C3_FULLWIDTH }, - { 0xFFE0, 0xFFE6, C3_SYMBOL }, - { 0xFFE8, 0xFFEE, C3_HALFWIDTH }, - { 0xFFE8, 0xFFEE, C3_SYMBOL } - }; - - if (-1 == Count) - { - Count = wcslen(Src) + 1; - } - switch(InfoType) - { - case CT_CTYPE1: - while (0 != Count--) - { - *CharType++ = GetCharType(*Src) & 0xfff; - Src++; - } - break; - case CT_CTYPE2: - while (0 != Count--) - { - *CharType++ = GetCharType(*Src) >> 12; - Src++; - } - break; - case CT_CTYPE3: - DPRINT("CT_CTYPE3: semi-stub.\n"); - while (0 != Count--) - { - int c = *Src; - WORD Type1, Type3 = 0; /* C3_NOTAPPLICABLE */ - unsigned Construct; - - Type1 = GetCharType(*Src) & 0xfff; - Src++; - - /* try to construct type3 from type1 */ - if (0 != (Type1 & C1_SPACE)) - { - Type3 |= C3_SYMBOL; - } - if (0 != (Type1 & C1_ALPHA)) - { - Type3 |= C3_ALPHA; - } - - for (Construct = 0; - Construct < sizeof(Type3Construct) / sizeof(Type3Construct[0]) - && Type3Construct[Construct].RangeStart <= c; - Construct++) - { - if (c <= Type3Construct[Construct].RangeEnd) - { - Type3 |= Type3Construct[Construct].Type3; - } - } - *CharType++ = Type3; - } - break; - default: - DPRINT1("Invalid InfoType %d\n", InfoType); - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - return TRUE; -} - - -/* - * @implemented - */ -BOOL -WINAPI -GetStringTypeA ( - LCID Locale, - DWORD InfoType, - LPCSTR Src, - int Count, - LPWORD CharType - ) -{ - UINT Cp; - INT CountW; - LPWSTR SrcW; - BOOL Ret = FALSE; - - if (-1 == Count) - { - Count = strlen(Src) + 1; - } - - if (! GetLocaleInfoW(Locale, LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER, - (WCHAR *) &Cp, sizeof(Cp) / sizeof(WCHAR))) - { - Cp = 0; - } - if (0 == Cp) - { - DPRINT1("For locale %04lx using current ANSI code page\n", Locale); - Cp = GetACP(); - } - - CountW = MultiByteToWideChar(Cp, 0, Src, Count, NULL, 0); - SrcW = HeapAlloc(GetProcessHeap(), 0, CountW * sizeof(WCHAR)); - if (NULL != SrcW) - { - MultiByteToWideChar(Cp, 0, Src, Count, SrcW, CountW); - /* - * NOTE: the target buffer has 1 word for each CHARACTER in the source - * string, with multibyte characters there maybe be more bytes in count - * than character space in the buffer! - */ - Ret = GetStringTypeW(InfoType, SrcW, CountW, CharType); - HeapFree(GetProcessHeap(), 0, SrcW); - } - - return Ret; -} diff --git a/reactos/dll/win32/kernel32/winnls/string/collation.c b/reactos/dll/win32/kernel32/winnls/string/collation.c index 446b03dc4e2..465d740001b 100644 --- a/reactos/dll/win32/kernel32/winnls/string/collation.c +++ b/reactos/dll/win32/kernel32/winnls/string/collation.c @@ -1,5 +1,5 @@ /* Unicode collation element table */ -/* generated from www.unicode.org/reports/tr10/allkeys.txt */ +/* generated from http://www.unicode.org/reports/tr10/allkeys.txt */ /* DO NOT EDIT!! */ const unsigned int collation_table[12800] = diff --git a/reactos/dll/win32/kernel32/winnls/string/format_msg.c b/reactos/dll/win32/kernel32/winnls/string/format_msg.c index 35b3c017274..692c24780b3 100644 --- a/reactos/dll/win32/kernel32/winnls/string/format_msg.c +++ b/reactos/dll/win32/kernel32/winnls/string/format_msg.c @@ -19,10 +19,24 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#define NDEBUG -#include -DEBUG_CHANNEL(resource); +#include +#include +#include + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winternl.h" +#include "winuser.h" +#include "winnls.h" +#include "wine/unicode.h" +#include "wine/debug.h" + +extern HMODULE kernel32_handle; + +WINE_DEFAULT_DEBUG_CHANNEL(resource); struct format_args { @@ -31,8 +45,6 @@ struct format_args int last; }; -static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2',0}; - /* Messages used by FormatMessage * * They can be specified either directly or using a message ID and @@ -63,7 +75,7 @@ static const WCHAR FMTWSTR[] = { '%','s',0 }; */ static LPWSTR load_message( HMODULE module, UINT id, WORD lang ) { - PMESSAGE_RESOURCE_ENTRY mre; + const MESSAGE_RESOURCE_ENTRY *mre; WCHAR *buffer; NTSTATUS status; @@ -389,7 +401,6 @@ DWORD WINAPI FormatMessageA( DWORD destlength; LPWSTR from; DWORD width = dwFlags & FORMAT_MESSAGE_MAX_WIDTH_MASK; - HMODULE kernel32_handle = GetModuleHandleW(kernel32W); TRACE("(0x%x,%p,%d,0x%x,%p,%d,%p)\n", dwFlags,lpSource,dwMessageId,dwLanguageId,lpBuffer,nSize,args); @@ -496,7 +507,6 @@ DWORD WINAPI FormatMessageW( DWORD talloced; LPWSTR from; DWORD width = dwFlags & FORMAT_MESSAGE_MAX_WIDTH_MASK; - HMODULE kernel32_handle = GetModuleHandleW(kernel32W); TRACE("(0x%x,%p,%d,0x%x,%p,%d,%p)\n", dwFlags,lpSource,dwMessageId,dwLanguageId,lpBuffer,nSize,args); diff --git a/reactos/dll/win32/kernel32/winnls/string/lang.c b/reactos/dll/win32/kernel32/winnls/string/lang.c index ac9868e21a1..7224db0437e 100644 --- a/reactos/dll/win32/kernel32/winnls/string/lang.c +++ b/reactos/dll/win32/kernel32/winnls/string/lang.c @@ -1,54 +1,346 @@ /* + * Locale support * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: dll/win32/kernel32/file/lang.c - * PURPOSE: National Laguage Support related funcs - * PROGRAMMER: Thomas Weidenmueller - * Gunnar Andre Dalsnes - * Aleksey Bragin - * Eric Kohl - * Alex Ionescu - * Richard Campbell - * James Tabor - * Dmitry Chapyshev - * UPDATE HISTORY: - * Created 21/09/2003 + * Copyright 1995 Martin von Loewis + * Copyright 1998 David Lee Lambert + * Copyright 2000 Julio César G√°zquez + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include +//#include "config.h" +//#include "wine/port.h" -#define NDEBUG -#include +#include +#include +#include +#include +#include +#include +#include + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" +#include "winbase.h" +#include "winuser.h" /* for RT_STRINGW */ +#include "winternl.h" +#include "wine/unicode.h" +#include "winnls.h" +#include "winerror.h" +#include "winver.h" +#include "wine/debug.h" #include "lcformat_private.h" - -#define LOCALE_LOCALEINFOFLAGSMASK (LOCALE_NOUSEROVERRIDE|LOCALE_USE_CP_ACP|\ - LOCALE_RETURN_NUMBER|LOCALE_RETURN_GENITIVE_NAMES) -#define CALINFO_MAX_YEAR 2029 - -//static LCID SystemLocale = MAKELCID(LANG_ENGLISH, SORT_DEFAULT); - -//static RTL_CRITICAL_SECTION LocalesListLock; - +#define REG_SZ 1 extern int wine_fold_string(int flags, const WCHAR *src, int srclen, WCHAR *dst, int dstlen); extern int wine_get_sortkey(int flags, const WCHAR *src, int srclen, char *dst, int dstlen); extern int wine_compare_string(int flags, const WCHAR *str1, int len1, const WCHAR *str2, int len2); - -typedef struct +static inline unsigned short get_char_typeW( WCHAR ch ) { - union - { - UILANGUAGE_ENUMPROCA procA; - UILANGUAGE_ENUMPROCW procW; - } u; - DWORD flags; - LONG_PTR param; -} ENUM_UILANG_CALLBACK; + extern const unsigned short wine_wctype_table[]; + return wine_wctype_table[wine_wctype_table[ch >> 8] + (ch & 0xff)]; +} -static const WCHAR szLocaleKeyName[] = L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\NLS\\Locale"; -static const WCHAR szLangGroupsKeyName[] = L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\NLS\\Language Groups"; +WINE_DEFAULT_DEBUG_CHANNEL(nls); + +extern HMODULE kernel32_handle; + +#define LOCALE_LOCALEINFOFLAGSMASK (LOCALE_NOUSEROVERRIDE|LOCALE_USE_CP_ACP|\ + LOCALE_RETURN_NUMBER|LOCALE_RETURN_GENITIVE_NAMES) + +static const WCHAR szNlsKeyName[] = { + 'M','a','c','h','i','n','e','\\','S','y','s','t','e','m','\\', + 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', + 'C','o','n','t','r','o','l','\\','N','l','s','\0' +}; + +static const WCHAR szLocaleKeyName[] = { + 'M','a','c','h','i','n','e','\\','S','y','s','t','e','m','\\', + 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', + 'C','o','n','t','r','o','l','\\','N','l','s','\\','L','o','c','a','l','e',0 +}; + +static const WCHAR szLangGroupsKeyName[] = { + 'M','a','c','h','i','n','e','\\','S','y','s','t','e','m','\\', + 'C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t','\\', + 'C','o','n','t','r','o','l','\\','N','l','s','\\', + 'L','a','n','g','u','a','g','e',' ','G','r','o','u','p','s',0 +}; + +/* Charset to codepage map, sorted by name. */ +static const struct charset_entry +{ + const char *charset_name; + UINT codepage; +} charset_names[] = +{ + { "BIG5", 950 }, + { "CP1250", 1250 }, + { "CP1251", 1251 }, + { "CP1252", 1252 }, + { "CP1253", 1253 }, + { "CP1254", 1254 }, + { "CP1255", 1255 }, + { "CP1256", 1256 }, + { "CP1257", 1257 }, + { "CP1258", 1258 }, + { "CP932", 932 }, + { "CP936", 936 }, + { "CP949", 949 }, + { "CP950", 950 }, + { "EUCJP", 20932 }, + { "GB2312", 936 }, + { "IBM037", 37 }, + { "IBM1026", 1026 }, + { "IBM424", 424 }, + { "IBM437", 437 }, + { "IBM500", 500 }, + { "IBM850", 850 }, + { "IBM852", 852 }, + { "IBM855", 855 }, + { "IBM857", 857 }, + { "IBM860", 860 }, + { "IBM861", 861 }, + { "IBM862", 862 }, + { "IBM863", 863 }, + { "IBM864", 864 }, + { "IBM865", 865 }, + { "IBM866", 866 }, + { "IBM869", 869 }, + { "IBM874", 874 }, + { "IBM875", 875 }, + { "ISO88591", 28591 }, + { "ISO885910", 28600 }, + { "ISO885913", 28603 }, + { "ISO885914", 28604 }, + { "ISO885915", 28605 }, + { "ISO885916", 28606 }, + { "ISO88592", 28592 }, + { "ISO88593", 28593 }, + { "ISO88594", 28594 }, + { "ISO88595", 28595 }, + { "ISO88596", 28596 }, + { "ISO88597", 28597 }, + { "ISO88598", 28598 }, + { "ISO88599", 28599 }, + { "KOI8R", 20866 }, + { "KOI8U", 21866 }, + { "UTF8", CP_UTF8 } +}; + + +struct locale_name +{ + WCHAR win_name[128]; /* Windows name ("en-US") */ + WCHAR lang[128]; /* language ("en") (note: buffer contains the other strings too) */ + WCHAR *country; /* country ("US") */ + WCHAR *charset; /* charset ("UTF-8") for Unix format only */ + WCHAR *script; /* script ("Latn") for Windows format only */ + WCHAR *modifier; /* modifier or sort order */ + LCID lcid; /* corresponding LCID */ + int matches; /* number of elements matching LCID (0..4) */ + UINT codepage; /* codepage corresponding to charset */ +}; + +/* locale ids corresponding to the various Unix locale parameters */ +static LCID lcid_LC_COLLATE; +static LCID lcid_LC_CTYPE; +static LCID lcid_LC_MONETARY; +static LCID lcid_LC_NUMERIC; +static LCID lcid_LC_TIME; +static LCID lcid_LC_PAPER; +static LCID lcid_LC_MEASUREMENT; +static LCID lcid_LC_TELEPHONE; + +/* Copy Ascii string to Unicode without using codepages */ +static inline void strcpynAtoW( WCHAR *dst, const char *src, size_t n ) +{ + while (n > 1 && *src) + { + *dst++ = (unsigned char)*src++; + n--; + } + if (n) *dst = 0; +} + + +/*********************************************************************** + * get_lcid_codepage + * + * Retrieve the ANSI codepage for a given locale. + */ +static inline UINT get_lcid_codepage( LCID lcid ) +{ + UINT ret; + if (!GetLocaleInfoW( lcid, LOCALE_IDEFAULTANSICODEPAGE|LOCALE_RETURN_NUMBER, (WCHAR *)&ret, + sizeof(ret)/sizeof(WCHAR) )) ret = 0; + return ret; +} + +/*********************************************************************** + * convert_default_lcid + * + * Get the default LCID to use for a given lctype in GetLocaleInfo. + */ +static LCID convert_default_lcid( LCID lcid, LCTYPE lctype ) +{ + if (lcid == LOCALE_SYSTEM_DEFAULT || + lcid == LOCALE_USER_DEFAULT || + lcid == LOCALE_NEUTRAL) + { + LCID default_id = 0; + + switch(lctype & 0xffff) + { + case LOCALE_SSORTNAME: + default_id = lcid_LC_COLLATE; + break; + + case LOCALE_FONTSIGNATURE: + case LOCALE_IDEFAULTANSICODEPAGE: + case LOCALE_IDEFAULTCODEPAGE: + case LOCALE_IDEFAULTEBCDICCODEPAGE: + case LOCALE_IDEFAULTMACCODEPAGE: + case LOCALE_IDEFAULTUNIXCODEPAGE: + default_id = lcid_LC_CTYPE; + break; + + case LOCALE_ICURRDIGITS: + case LOCALE_ICURRENCY: + case LOCALE_IINTLCURRDIGITS: + case LOCALE_INEGCURR: + case LOCALE_INEGSEPBYSPACE: + case LOCALE_INEGSIGNPOSN: + case LOCALE_INEGSYMPRECEDES: + case LOCALE_IPOSSEPBYSPACE: + case LOCALE_IPOSSIGNPOSN: + case LOCALE_IPOSSYMPRECEDES: + case LOCALE_SCURRENCY: + case LOCALE_SINTLSYMBOL: + case LOCALE_SMONDECIMALSEP: + case LOCALE_SMONGROUPING: + case LOCALE_SMONTHOUSANDSEP: + case LOCALE_SNATIVECURRNAME: + default_id = lcid_LC_MONETARY; + break; + + case LOCALE_IDIGITS: + case LOCALE_IDIGITSUBSTITUTION: + case LOCALE_ILZERO: + case LOCALE_INEGNUMBER: + case LOCALE_SDECIMAL: + case LOCALE_SGROUPING: + //case LOCALE_SNAN: + case LOCALE_SNATIVEDIGITS: + case LOCALE_SNEGATIVESIGN: + //case LOCALE_SNEGINFINITY: + //case LOCALE_SPOSINFINITY: + case LOCALE_SPOSITIVESIGN: + case LOCALE_STHOUSAND: + default_id = lcid_LC_NUMERIC; + break; + + case LOCALE_ICALENDARTYPE: + case LOCALE_ICENTURY: + case LOCALE_IDATE: + case LOCALE_IDAYLZERO: + case LOCALE_IFIRSTDAYOFWEEK: + case LOCALE_IFIRSTWEEKOFYEAR: + case LOCALE_ILDATE: + case LOCALE_IMONLZERO: + case LOCALE_IOPTIONALCALENDAR: + case LOCALE_ITIME: + case LOCALE_ITIMEMARKPOSN: + case LOCALE_ITLZERO: + case LOCALE_S1159: + case LOCALE_S2359: + case LOCALE_SABBREVDAYNAME1: + case LOCALE_SABBREVDAYNAME2: + case LOCALE_SABBREVDAYNAME3: + case LOCALE_SABBREVDAYNAME4: + case LOCALE_SABBREVDAYNAME5: + case LOCALE_SABBREVDAYNAME6: + case LOCALE_SABBREVDAYNAME7: + case LOCALE_SABBREVMONTHNAME1: + case LOCALE_SABBREVMONTHNAME2: + case LOCALE_SABBREVMONTHNAME3: + case LOCALE_SABBREVMONTHNAME4: + case LOCALE_SABBREVMONTHNAME5: + case LOCALE_SABBREVMONTHNAME6: + case LOCALE_SABBREVMONTHNAME7: + case LOCALE_SABBREVMONTHNAME8: + case LOCALE_SABBREVMONTHNAME9: + case LOCALE_SABBREVMONTHNAME10: + case LOCALE_SABBREVMONTHNAME11: + case LOCALE_SABBREVMONTHNAME12: + case LOCALE_SABBREVMONTHNAME13: + case LOCALE_SDATE: + case LOCALE_SDAYNAME1: + case LOCALE_SDAYNAME2: + case LOCALE_SDAYNAME3: + case LOCALE_SDAYNAME4: + case LOCALE_SDAYNAME5: + case LOCALE_SDAYNAME6: + case LOCALE_SDAYNAME7: + //case LOCALE_SDURATION: + case LOCALE_SLONGDATE: + case LOCALE_SMONTHNAME1: + case LOCALE_SMONTHNAME2: + case LOCALE_SMONTHNAME3: + case LOCALE_SMONTHNAME4: + case LOCALE_SMONTHNAME5: + case LOCALE_SMONTHNAME6: + case LOCALE_SMONTHNAME7: + case LOCALE_SMONTHNAME8: + case LOCALE_SMONTHNAME9: + case LOCALE_SMONTHNAME10: + case LOCALE_SMONTHNAME11: + case LOCALE_SMONTHNAME12: + case LOCALE_SMONTHNAME13: + case LOCALE_SSHORTDATE: + //case LOCALE_SSHORTESTDAYNAME1: + //case LOCALE_SSHORTESTDAYNAME2: + //case LOCALE_SSHORTESTDAYNAME3: + //case LOCALE_SSHORTESTDAYNAME4: + //case LOCALE_SSHORTESTDAYNAME5: + //case LOCALE_SSHORTESTDAYNAME6: + //case LOCALE_SSHORTESTDAYNAME7: + case LOCALE_STIME: + case LOCALE_STIMEFORMAT: + case LOCALE_SYEARMONTH: + default_id = lcid_LC_TIME; + break; + + case LOCALE_IPAPERSIZE: + default_id = lcid_LC_PAPER; + break; + + case LOCALE_IMEASURE: + default_id = lcid_LC_MEASUREMENT; + break; + + case LOCALE_ICOUNTRY: + default_id = lcid_LC_TELEPHONE; + break; + } + if (default_id) lcid = default_id; + } + return ConvertDefaultLocale( lcid ); +} /*********************************************************************** * is_genitive_name_supported @@ -85,11 +377,11 @@ static BOOL is_genitive_name_supported( LCTYPE lctype ) */ static inline HANDLE create_registry_key(void) { - static const WCHAR intlW[] = {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\', - 'I','n','t','e','r','n','a','t','i','o','n','a','l',0}; + static const WCHAR cplW[] = {'C','o','n','t','r','o','l',' ','P','a','n','e','l',0}; + static const WCHAR intlW[] = {'I','n','t','e','r','n','a','t','i','o','n','a','l',0}; OBJECT_ATTRIBUTES attr; UNICODE_STRING nameW; - HANDLE hkey; + HANDLE cpl_key, hkey = 0; if (RtlOpenCurrentUser( KEY_ALL_ACCESS, &hkey ) != STATUS_SUCCESS) return 0; @@ -99,18 +391,710 @@ static inline HANDLE create_registry_key(void) attr.Attributes = 0; attr.SecurityDescriptor = NULL; attr.SecurityQualityOfService = NULL; - RtlInitUnicodeString( &nameW, intlW ); + RtlInitUnicodeString( &nameW, cplW ); - if (NtCreateKey( &hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL ) != STATUS_SUCCESS) hkey = 0; + if (!NtCreateKey( &cpl_key, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL )) + { + NtClose( attr.RootDirectory ); + attr.RootDirectory = cpl_key; + RtlInitUnicodeString( &nameW, intlW ); + if (NtCreateKey( &hkey, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL )) hkey = 0; + } NtClose( attr.RootDirectory ); return hkey; } -/****************************************************************************** - * @implemented - * RIPPED FROM WINE's dlls\kernel\locale.c rev 1.42 +/*********************************************************************** + * GetUserDefaultLangID (KERNEL32.@) * - * ConvertDefaultLocale (KERNEL32.@) + * Get the default language Id for the current user. + * + * PARAMS + * None. + * + * RETURNS + * The current LANGID of the default language for the current user. + */ +LANGID WINAPI GetUserDefaultLangID(void) +{ + return LANGIDFROMLCID(GetUserDefaultLCID()); +} + + +/*********************************************************************** + * GetSystemDefaultLangID (KERNEL32.@) + * + * Get the default language Id for the system. + * + * PARAMS + * None. + * + * RETURNS + * The current LANGID of the default language for the system. + */ +LANGID WINAPI GetSystemDefaultLangID(void) +{ + return LANGIDFROMLCID(GetSystemDefaultLCID()); +} + + +/*********************************************************************** + * GetUserDefaultLCID (KERNEL32.@) + * + * Get the default locale Id for the current user. + * + * PARAMS + * None. + * + * RETURNS + * The current LCID of the default locale for the current user. + */ +LCID WINAPI GetUserDefaultLCID(void) +{ + LCID lcid; + NtQueryDefaultLocale( TRUE, &lcid ); + return lcid; +} + + +/*********************************************************************** + * GetSystemDefaultLCID (KERNEL32.@) + * + * Get the default locale Id for the system. + * + * PARAMS + * None. + * + * RETURNS + * The current LCID of the default locale for the system. + */ +LCID WINAPI GetSystemDefaultLCID(void) +{ + LCID lcid; + NtQueryDefaultLocale( FALSE, &lcid ); + return lcid; +} + + +/*********************************************************************** + * GetUserDefaultUILanguage (KERNEL32.@) + * + * Get the default user interface language Id for the current user. + * + * PARAMS + * None. + * + * RETURNS + * The current LANGID of the default UI language for the current user. + */ +LANGID WINAPI GetUserDefaultUILanguage(void) +{ + LANGID lang; + NtQueryDefaultUILanguage( &lang ); + return lang; +} + + +/*********************************************************************** + * GetSystemDefaultUILanguage (KERNEL32.@) + * + * Get the default user interface language Id for the system. + * + * PARAMS + * None. + * + * RETURNS + * The current LANGID of the default UI language for the system. This is + * typically the same language used during the installation process. + */ +LANGID WINAPI GetSystemDefaultUILanguage(void) +{ + LANGID lang; + NtQueryInstallUILanguage( &lang ); + return lang; +} + +/****************************************************************************** + * get_locale_value_name + * + * Gets the registry value name for a given lctype. + */ +static const WCHAR *get_locale_value_name( DWORD lctype ) +{ + static const WCHAR iCalendarTypeW[] = {'i','C','a','l','e','n','d','a','r','T','y','p','e',0}; + static const WCHAR iCountryW[] = {'i','C','o','u','n','t','r','y',0}; + static const WCHAR iCurrDigitsW[] = {'i','C','u','r','r','D','i','g','i','t','s',0}; + static const WCHAR iCurrencyW[] = {'i','C','u','r','r','e','n','c','y',0}; + static const WCHAR iDateW[] = {'i','D','a','t','e',0}; + static const WCHAR iDigitsW[] = {'i','D','i','g','i','t','s',0}; + static const WCHAR iFirstDayOfWeekW[] = {'i','F','i','r','s','t','D','a','y','O','f','W','e','e','k',0}; + static const WCHAR iFirstWeekOfYearW[] = {'i','F','i','r','s','t','W','e','e','k','O','f','Y','e','a','r',0}; + static const WCHAR iLDateW[] = {'i','L','D','a','t','e',0}; + static const WCHAR iLZeroW[] = {'i','L','Z','e','r','o',0}; + static const WCHAR iMeasureW[] = {'i','M','e','a','s','u','r','e',0}; + static const WCHAR iNegCurrW[] = {'i','N','e','g','C','u','r','r',0}; + static const WCHAR iNegNumberW[] = {'i','N','e','g','N','u','m','b','e','r',0}; + static const WCHAR iPaperSizeW[] = {'i','P','a','p','e','r','S','i','z','e',0}; + static const WCHAR iTLZeroW[] = {'i','T','L','Z','e','r','o',0}; + static const WCHAR iTimePrefixW[] = {'i','T','i','m','e','P','r','e','f','i','x',0}; + static const WCHAR iTimeW[] = {'i','T','i','m','e',0}; + static const WCHAR s1159W[] = {'s','1','1','5','9',0}; + static const WCHAR s2359W[] = {'s','2','3','5','9',0}; + static const WCHAR sCountryW[] = {'s','C','o','u','n','t','r','y',0}; + static const WCHAR sCurrencyW[] = {'s','C','u','r','r','e','n','c','y',0}; + static const WCHAR sDateW[] = {'s','D','a','t','e',0}; + static const WCHAR sDecimalW[] = {'s','D','e','c','i','m','a','l',0}; + static const WCHAR sGroupingW[] = {'s','G','r','o','u','p','i','n','g',0}; + static const WCHAR sLanguageW[] = {'s','L','a','n','g','u','a','g','e',0}; + static const WCHAR sListW[] = {'s','L','i','s','t',0}; + static const WCHAR sLongDateW[] = {'s','L','o','n','g','D','a','t','e',0}; + static const WCHAR sMonDecimalSepW[] = {'s','M','o','n','D','e','c','i','m','a','l','S','e','p',0}; + static const WCHAR sMonGroupingW[] = {'s','M','o','n','G','r','o','u','p','i','n','g',0}; + static const WCHAR sMonThousandSepW[] = {'s','M','o','n','T','h','o','u','s','a','n','d','S','e','p',0}; + static const WCHAR sNativeDigitsW[] = {'s','N','a','t','i','v','e','D','i','g','i','t','s',0}; + static const WCHAR sNegativeSignW[] = {'s','N','e','g','a','t','i','v','e','S','i','g','n',0}; + static const WCHAR sPositiveSignW[] = {'s','P','o','s','i','t','i','v','e','S','i','g','n',0}; + static const WCHAR sShortDateW[] = {'s','S','h','o','r','t','D','a','t','e',0}; + static const WCHAR sThousandW[] = {'s','T','h','o','u','s','a','n','d',0}; + static const WCHAR sTimeFormatW[] = {'s','T','i','m','e','F','o','r','m','a','t',0}; + static const WCHAR sTimeW[] = {'s','T','i','m','e',0}; + static const WCHAR sYearMonthW[] = {'s','Y','e','a','r','M','o','n','t','h',0}; + static const WCHAR NumShapeW[] = {'N','u','m','s','h','a','p','e',0}; + + switch (lctype) + { + /* These values are used by SetLocaleInfo and GetLocaleInfo, and + * the values are stored in the registry, confirmed under Windows. + */ + case LOCALE_ICALENDARTYPE: return iCalendarTypeW; + case LOCALE_ICURRDIGITS: return iCurrDigitsW; + case LOCALE_ICURRENCY: return iCurrencyW; + case LOCALE_IDIGITS: return iDigitsW; + case LOCALE_IFIRSTDAYOFWEEK: return iFirstDayOfWeekW; + case LOCALE_IFIRSTWEEKOFYEAR: return iFirstWeekOfYearW; + case LOCALE_ILZERO: return iLZeroW; + case LOCALE_IMEASURE: return iMeasureW; + case LOCALE_INEGCURR: return iNegCurrW; + case LOCALE_INEGNUMBER: return iNegNumberW; + case LOCALE_IPAPERSIZE: return iPaperSizeW; + case LOCALE_ITIME: return iTimeW; + case LOCALE_S1159: return s1159W; + case LOCALE_S2359: return s2359W; + case LOCALE_SCURRENCY: return sCurrencyW; + case LOCALE_SDATE: return sDateW; + case LOCALE_SDECIMAL: return sDecimalW; + case LOCALE_SGROUPING: return sGroupingW; + case LOCALE_SLIST: return sListW; + case LOCALE_SLONGDATE: return sLongDateW; + case LOCALE_SMONDECIMALSEP: return sMonDecimalSepW; + case LOCALE_SMONGROUPING: return sMonGroupingW; + case LOCALE_SMONTHOUSANDSEP: return sMonThousandSepW; + case LOCALE_SNEGATIVESIGN: return sNegativeSignW; + case LOCALE_SPOSITIVESIGN: return sPositiveSignW; + case LOCALE_SSHORTDATE: return sShortDateW; + case LOCALE_STHOUSAND: return sThousandW; + case LOCALE_STIME: return sTimeW; + case LOCALE_STIMEFORMAT: return sTimeFormatW; + case LOCALE_SYEARMONTH: return sYearMonthW; + + /* The following are not listed under MSDN as supported, + * but seem to be used and also stored in the registry. + */ + case LOCALE_ICOUNTRY: return iCountryW; + case LOCALE_IDATE: return iDateW; + case LOCALE_ILDATE: return iLDateW; + case LOCALE_ITLZERO: return iTLZeroW; + case LOCALE_SCOUNTRY: return sCountryW; + case LOCALE_SABBREVLANGNAME: return sLanguageW; + + /* The following are used in XP and later */ + case LOCALE_IDIGITSUBSTITUTION: return NumShapeW; + case LOCALE_SNATIVEDIGITS: return sNativeDigitsW; + case LOCALE_ITIMEMARKPOSN: return iTimePrefixW; + } + return NULL; +} + + +/****************************************************************************** + * get_registry_locale_info + * + * Retrieve user-modified locale info from the registry. + * Return length, 0 on error, -1 if not found. + */ +static INT get_registry_locale_info( LPCWSTR value, LPWSTR buffer, INT len ) +{ + DWORD size; + INT ret; + HANDLE hkey; + NTSTATUS status; + UNICODE_STRING nameW; + KEY_VALUE_PARTIAL_INFORMATION *info; + static const int info_size = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data); + + if (!(hkey = create_registry_key())) return -1; + + RtlInitUnicodeString( &nameW, value ); + size = info_size + len * sizeof(WCHAR); + + if (!(info = HeapAlloc( GetProcessHeap(), 0, size ))) + { + NtClose( hkey ); + SetLastError( ERROR_NOT_ENOUGH_MEMORY ); + return 0; + } + + status = NtQueryValueKey( hkey, &nameW, KeyValuePartialInformation, info, size, &size ); + + if (!status) + { + ret = (size - info_size) / sizeof(WCHAR); + /* append terminating null if needed */ + if (!ret || ((WCHAR *)info->Data)[ret-1]) + { + if (ret < len || !buffer) ret++; + else + { + SetLastError( ERROR_INSUFFICIENT_BUFFER ); + ret = 0; + } + } + if (ret && buffer) + { + memcpy( buffer, info->Data, (ret-1) * sizeof(WCHAR) ); + buffer[ret-1] = 0; + } + } + else if (status == STATUS_BUFFER_OVERFLOW && !buffer) + { + ret = (size - info_size) / sizeof(WCHAR) + 1; + } + else if (status == STATUS_OBJECT_NAME_NOT_FOUND) + { + ret = -1; + } + else + { + SetLastError( RtlNtStatusToDosError(status) ); + ret = 0; + } + NtClose( hkey ); + HeapFree( GetProcessHeap(), 0, info ); + return ret; +} + + +/****************************************************************************** + * GetLocaleInfoA (KERNEL32.@) + * + * Get information about an aspect of a locale. + * + * PARAMS + * lcid [I] LCID of the locale + * lctype [I] LCTYPE_ flags from "winnls.h" + * buffer [O] Destination for the information + * len [I] Length of buffer in characters + * + * RETURNS + * Success: The size of the data requested. If buffer is non-NULL, it is filled + * with the information. + * Failure: 0. Use GetLastError() to determine the cause. + * + * NOTES + * - LOCALE_NEUTRAL is equal to LOCALE_SYSTEM_DEFAULT + * - The string returned is NUL terminated, except for LOCALE_FONTSIGNATURE, + * which is a bit string. + */ +INT WINAPI GetLocaleInfoA( LCID lcid, LCTYPE lctype, LPSTR buffer, INT len ) +{ + WCHAR *bufferW; + INT lenW, ret; + + TRACE( "(lcid=0x%x,lctype=0x%x,%p,%d)\n", lcid, lctype, buffer, len ); + + if (len < 0 || (len && !buffer)) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return 0; + } + if (lctype & LOCALE_RETURN_GENITIVE_NAMES ) + { + SetLastError( ERROR_INVALID_FLAGS ); + return 0; + } + + if (!len) buffer = NULL; + + if (!(lenW = GetLocaleInfoW( lcid, lctype, NULL, 0 ))) return 0; + + if (!(bufferW = HeapAlloc( GetProcessHeap(), 0, lenW * sizeof(WCHAR) ))) + { + SetLastError( ERROR_NOT_ENOUGH_MEMORY ); + return 0; + } + if ((ret = GetLocaleInfoW( lcid, lctype, bufferW, lenW ))) + { + if ((lctype & LOCALE_RETURN_NUMBER) || + ((lctype & ~LOCALE_LOCALEINFOFLAGSMASK) == LOCALE_FONTSIGNATURE)) + { + /* it's not an ASCII string, just bytes */ + ret *= sizeof(WCHAR); + if (buffer) + { + if (ret <= len) memcpy( buffer, bufferW, ret ); + else + { + SetLastError( ERROR_INSUFFICIENT_BUFFER ); + ret = 0; + } + } + } + else + { + UINT codepage = CP_ACP; + if (!(lctype & LOCALE_USE_CP_ACP)) codepage = get_lcid_codepage( lcid ); + ret = WideCharToMultiByte( codepage, 0, bufferW, ret, buffer, len, NULL, NULL ); + } + } + HeapFree( GetProcessHeap(), 0, bufferW ); + return ret; +} + + +/****************************************************************************** + * GetLocaleInfoW (KERNEL32.@) + * + * See GetLocaleInfoA. + */ +INT WINAPI GetLocaleInfoW( LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len ) +{ + LANGID lang_id; + HRSRC hrsrc; + HGLOBAL hmem; + INT ret; + UINT lcflags; + const WCHAR *p; + unsigned int i; + + if (len < 0 || (len && !buffer)) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return 0; + } + if (lctype & LOCALE_RETURN_GENITIVE_NAMES && + !is_genitive_name_supported( lctype )) + { + SetLastError( ERROR_INVALID_FLAGS ); + return 0; + } + + if (!len) buffer = NULL; + + lcid = convert_default_lcid( lcid, lctype ); + + lcflags = lctype & LOCALE_LOCALEINFOFLAGSMASK; + lctype &= 0xffff; + + TRACE( "(lcid=0x%x,lctype=0x%x,%p,%d)\n", lcid, lctype, buffer, len ); + + /* first check for overrides in the registry */ + + if (!(lcflags & LOCALE_NOUSEROVERRIDE) && + lcid == convert_default_lcid( LOCALE_USER_DEFAULT, lctype )) + { + const WCHAR *value = get_locale_value_name(lctype); + + if (value) + { + if (lcflags & LOCALE_RETURN_NUMBER) + { + WCHAR tmp[16]; + ret = get_registry_locale_info( value, tmp, sizeof(tmp)/sizeof(WCHAR) ); + if (ret > 0) + { + WCHAR *end; + UINT number = strtolW( tmp, &end, 10 ); + if (*end) /* invalid number */ + { + SetLastError( ERROR_INVALID_FLAGS ); + return 0; + } + ret = sizeof(UINT)/sizeof(WCHAR); + if (!buffer) return ret; + if (ret > len) + { + SetLastError( ERROR_INSUFFICIENT_BUFFER ); + return 0; + } + memcpy( buffer, &number, sizeof(number) ); + } + } + else ret = get_registry_locale_info( value, buffer, len ); + + if (ret != -1) return ret; + } + } + + /* now load it from kernel resources */ + + lang_id = LANGIDFROMLCID( lcid ); + + /* replace SUBLANG_NEUTRAL by SUBLANG_DEFAULT */ + if (SUBLANGID(lang_id) == SUBLANG_NEUTRAL) + lang_id = MAKELANGID(PRIMARYLANGID(lang_id), SUBLANG_DEFAULT); + + if (!(hrsrc = FindResourceExW( kernel32_handle, (LPWSTR)RT_STRING, + ULongToPtr((lctype >> 4) + 1), lang_id ))) + { + SetLastError( ERROR_INVALID_FLAGS ); /* no such lctype */ + return 0; + } + if (!(hmem = LoadResource( kernel32_handle, hrsrc ))) + return 0; + + p = LockResource( hmem ); + for (i = 0; i < (lctype & 0x0f); i++) p += *p + 1; + + if (lcflags & LOCALE_RETURN_NUMBER) ret = sizeof(UINT)/sizeof(WCHAR); + else if (is_genitive_name_supported( lctype ) && *p) + { + /* genitive form's stored after a null separator from a nominative */ + for (i = 1; i <= *p; i++) if (!p[i]) break; + + if (i <= *p && (lcflags & LOCALE_RETURN_GENITIVE_NAMES)) + { + ret = *p - i + 1; + p += i; + } + else ret = i; + } + else + ret = (lctype == LOCALE_FONTSIGNATURE) ? *p : *p + 1; + + if (!buffer) return ret; + + if (ret > len) + { + SetLastError( ERROR_INSUFFICIENT_BUFFER ); + return 0; + } + + if (lcflags & LOCALE_RETURN_NUMBER) + { + UINT number; + WCHAR *end, *tmp = HeapAlloc( GetProcessHeap(), 0, (*p + 1) * sizeof(WCHAR) ); + if (!tmp) return 0; + memcpy( tmp, p + 1, *p * sizeof(WCHAR) ); + tmp[*p] = 0; + number = strtolW( tmp, &end, 10 ); + if (!*end) + memcpy( buffer, &number, sizeof(number) ); + else /* invalid number */ + { + SetLastError( ERROR_INVALID_FLAGS ); + ret = 0; + } + HeapFree( GetProcessHeap(), 0, tmp ); + + TRACE( "(lcid=0x%x,lctype=0x%x,%p,%d) returning number %d\n", + lcid, lctype, buffer, len, number ); + } + else + { + memcpy( buffer, p + 1, ret * sizeof(WCHAR) ); + if (lctype != LOCALE_FONTSIGNATURE) buffer[ret-1] = 0; + + TRACE( "(lcid=0x%x,lctype=0x%x,%p,%d) returning %d %s\n", + lcid, lctype, buffer, len, ret, debugstr_w(buffer) ); + } + return ret; +} + + +/****************************************************************************** + * SetLocaleInfoA [KERNEL32.@] + * + * Set information about an aspect of a locale. + * + * PARAMS + * lcid [I] LCID of the locale + * lctype [I] LCTYPE_ flags from "winnls.h" + * data [I] Information to set + * + * RETURNS + * Success: TRUE. The information given will be returned by GetLocaleInfoA() + * whenever it is called without LOCALE_NOUSEROVERRIDE. + * Failure: FALSE. Use GetLastError() to determine the cause. + * + * NOTES + * - Values are only be set for the current user locale; the system locale + * settings cannot be changed. + * - Any settings changed by this call are lost when the locale is changed by + * the control panel (in Wine, this happens every time you change LANG). + * - The native implementation of this function does not check that lcid matches + * the current user locale, and simply sets the new values. Wine warns you in + * this case, but behaves the same. + */ +BOOL WINAPI SetLocaleInfoA(LCID lcid, LCTYPE lctype, LPCSTR data) +{ + UINT codepage = CP_ACP; + WCHAR *strW; + DWORD len; + BOOL ret; + + if (!(lctype & LOCALE_USE_CP_ACP)) codepage = get_lcid_codepage( lcid ); + + if (!data) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return FALSE; + } + len = MultiByteToWideChar( codepage, 0, data, -1, NULL, 0 ); + if (!(strW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) + { + SetLastError( ERROR_NOT_ENOUGH_MEMORY ); + return FALSE; + } + MultiByteToWideChar( codepage, 0, data, -1, strW, len ); + ret = SetLocaleInfoW( lcid, lctype, strW ); + HeapFree( GetProcessHeap(), 0, strW ); + return ret; +} + + +/****************************************************************************** + * SetLocaleInfoW (KERNEL32.@) + * + * See SetLocaleInfoA. + */ +BOOL WINAPI SetLocaleInfoW( LCID lcid, LCTYPE lctype, LPCWSTR data ) +{ + const WCHAR *value; + static const WCHAR intlW[] = {'i','n','t','l',0 }; + UNICODE_STRING valueW; + NTSTATUS status; + HANDLE hkey; + + lctype &= 0xffff; + value = get_locale_value_name( lctype ); + + if (!data || !value) + { + SetLastError( ERROR_INVALID_PARAMETER ); + return FALSE; + } + + if (lctype == LOCALE_IDATE || lctype == LOCALE_ILDATE) + { + SetLastError( ERROR_INVALID_FLAGS ); + return FALSE; + } + + TRACE("setting %x (%s) to %s\n", lctype, debugstr_w(value), debugstr_w(data) ); + + /* FIXME: should check that data to set is sane */ + + /* FIXME: profile functions should map to registry */ + WriteProfileStringW( intlW, value, data ); + + if (!(hkey = create_registry_key())) return FALSE; + RtlInitUnicodeString( &valueW, value ); + status = NtSetValueKey( hkey, &valueW, 0, REG_SZ, data, (strlenW(data)+1)*sizeof(WCHAR) ); + + if (lctype == LOCALE_SSHORTDATE || lctype == LOCALE_SLONGDATE) + { + /* Set I-value from S value */ + WCHAR *lpD, *lpM, *lpY; + WCHAR szBuff[2]; + + lpD = strrchrW(data, 'd'); + lpM = strrchrW(data, 'M'); + lpY = strrchrW(data, 'y'); + + if (lpD <= lpM) + { + szBuff[0] = '1'; /* D-M-Y */ + } + else + { + if (lpY <= lpM) + szBuff[0] = '2'; /* Y-M-D */ + else + szBuff[0] = '0'; /* M-D-Y */ + } + + szBuff[1] = '\0'; + + if (lctype == LOCALE_SSHORTDATE) + lctype = LOCALE_IDATE; + else + lctype = LOCALE_ILDATE; + + value = get_locale_value_name( lctype ); + + WriteProfileStringW( intlW, value, szBuff ); + + RtlInitUnicodeString( &valueW, value ); + status = NtSetValueKey( hkey, &valueW, 0, REG_SZ, szBuff, sizeof(szBuff) ); + } + + NtClose( hkey ); + + if (status) SetLastError( RtlNtStatusToDosError(status) ); + return !status; +} + +/*********************************************************************** + * GetThreadLocale (KERNEL32.@) + * + * Get the current threads locale. + * + * PARAMS + * None. + * + * RETURNS + * The LCID currently associated with the calling thread. + */ +LCID WINAPI GetThreadLocale(void) +{ + LCID ret = NtCurrentTeb()->CurrentLocale; + if (!ret) NtCurrentTeb()->CurrentLocale = ret = GetUserDefaultLCID(); + return ret; +} + +/********************************************************************** + * SetThreadLocale (KERNEL32.@) + * + * Set the current threads locale. + * + * PARAMS + * lcid [I] LCID of the locale to set + * + * RETURNS + * Success: TRUE. The threads locale is set to lcid. + * Failure: FALSE. Use GetLastError() to determine the cause. + */ +BOOL WINAPI SetThreadLocale( LCID lcid ) +{ + TRACE("(0x%04X)\n", lcid); + + lcid = ConvertDefaultLocale(lcid); + + if (lcid != GetThreadLocale()) + { + if (!IsValidLocale(lcid, LCID_SUPPORTED)) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + NtCurrentTeb()->CurrentLocale = lcid; + } + return TRUE; +} + +/****************************************************************************** + * ConvertDefaultLocale (KERNEL32.@) * * Convert a default locale identifier into a real identifier. * @@ -124,1664 +1108,526 @@ static inline HANDLE create_registry_key(void) * GetUserDefaultLCID(), if lcid == LOCALE_USER_DEFAULT or LOCALE_NEUTRAL. * Otherwise, lcid with sublanguage changed to SUBLANG_DEFAULT. */ -LCID WINAPI -ConvertDefaultLocale(LCID lcid) +LCID WINAPI ConvertDefaultLocale( LCID lcid ) { - LANGID langid; + LANGID langid; - switch (lcid) - { + switch (lcid) + { case LOCALE_SYSTEM_DEFAULT: - lcid = GetSystemDefaultLCID(); - break; - + lcid = GetSystemDefaultLCID(); + break; case LOCALE_USER_DEFAULT: case LOCALE_NEUTRAL: - lcid = GetUserDefaultLCID(); - break; - - default: - /* Replace SUBLANG_NEUTRAL with SUBLANG_DEFAULT */ - langid = LANGIDFROMLCID(lcid); - if (SUBLANGID(langid) == SUBLANG_NEUTRAL) - { - langid = MAKELANGID(PRIMARYLANGID(langid), SUBLANG_DEFAULT); - lcid = MAKELCID(langid, SORTIDFROMLCID(lcid)); - } - } - - return lcid; -} - - -static BOOL NLS_RegEnumValue(HANDLE hKey, UINT ulIndex, - LPWSTR szValueName, ULONG valueNameSize, - LPWSTR szValueData, ULONG valueDataSize) -{ - BYTE buffer[80]; - KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)buffer; - DWORD dwLen; - - if (NtEnumerateValueKey( hKey, ulIndex, KeyValueFullInformation, - buffer, sizeof(buffer), &dwLen ) != STATUS_SUCCESS || - info->NameLength > valueNameSize || - info->DataLength > valueDataSize) - { - return FALSE; - } - - DPRINT("info->Name %s info->DataLength %d\n", info->Name, info->DataLength); - - memcpy( szValueName, info->Name, info->NameLength); - szValueName[info->NameLength / sizeof(WCHAR)] = '\0'; - memcpy( szValueData, buffer + info->DataOffset, info->DataLength ); - szValueData[info->DataLength / sizeof(WCHAR)] = '\0'; - - DPRINT("returning %s %s\n", szValueName, szValueData); - return TRUE; -} - - -static HANDLE NLS_RegOpenKey(HANDLE hRootKey, LPCWSTR szKeyName) -{ - UNICODE_STRING keyName; - OBJECT_ATTRIBUTES attr; - HANDLE hkey; - - RtlInitUnicodeString( &keyName, szKeyName ); - InitializeObjectAttributes(&attr, &keyName, OBJ_CASE_INSENSITIVE, hRootKey, NULL); - - if (NtOpenKey( &hkey, KEY_ALL_ACCESS, &attr ) != STATUS_SUCCESS) - { - SetLastError( ERROR_BADDB ); - hkey = 0; - } - - return hkey; -} - -static BOOL NLS_RegEnumSubKey(HANDLE hKey, UINT ulIndex, LPWSTR szKeyName, - ULONG keyNameSize) -{ - BYTE buffer[80]; - KEY_BASIC_INFORMATION *info = (KEY_BASIC_INFORMATION *)buffer; - DWORD dwLen; - - if (NtEnumerateKey( hKey, ulIndex, KeyBasicInformation, buffer, - sizeof(buffer), &dwLen) != STATUS_SUCCESS || - info->NameLength > keyNameSize) - { - return FALSE; - } - - DPRINT("info->Name %s info->NameLength %d\n", info->Name, info->NameLength); - - memcpy( szKeyName, info->Name, info->NameLength); - szKeyName[info->NameLength / sizeof(WCHAR)] = '\0'; - - DPRINT("returning %s\n", szKeyName); - return TRUE; -} - -static BOOL NLS_RegGetDword(HANDLE hKey, LPCWSTR szValueName, DWORD *lpVal) -{ - BYTE buffer[128]; - const KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer; - DWORD dwSize = sizeof(buffer); - UNICODE_STRING valueName; - - RtlInitUnicodeString( &valueName, szValueName ); - - DPRINT("%p, %s\n", hKey, szValueName); - if (NtQueryValueKey( hKey, &valueName, KeyValuePartialInformation, - buffer, dwSize, &dwSize ) == STATUS_SUCCESS && - info->DataLength == sizeof(DWORD)) - { - memcpy(lpVal, info->Data, sizeof(DWORD)); - return TRUE; - } - - return FALSE; -} - -static BOOL NLS_GetLanguageGroupName(LGRPID lgrpid, LPWSTR szName, ULONG nameSize) -{ - LANGID langId; - LPCWSTR szResourceName = MAKEINTRESOURCEW(((lgrpid + 0x2000) >> 4) + 1); - HRSRC hResource; - BOOL bRet = FALSE; - - /* FIXME: Is it correct to use the system default langid? */ - langId = GetSystemDefaultLangID(); - - if (SUBLANGID(langId) == SUBLANG_NEUTRAL) - langId = MAKELANGID( PRIMARYLANGID(langId), SUBLANG_DEFAULT ); - - hResource = FindResourceExW( hCurrentModule, (LPWSTR)RT_STRING, szResourceName, langId ); - - if (hResource) - { - HGLOBAL hResDir = LoadResource( hCurrentModule, hResource ); - - if (hResDir) - { - ULONG iResourceIndex = lgrpid & 0xf; - LPCWSTR lpResEntry = LockResource( hResDir ); - ULONG i; - - for (i = 0; i < iResourceIndex; i++) - lpResEntry += *lpResEntry + 1; - - if (*lpResEntry < nameSize) - { - memcpy( szName, lpResEntry + 1, *lpResEntry * sizeof(WCHAR) ); - szName[*lpResEntry] = '\0'; - bRet = TRUE; - } - - } - FreeResource( hResource ); - } - else DPRINT1("FindResourceExW() failed\n"); - - return bRet; -} - - -/* Callback function ptrs for EnumLanguageGrouplocalesA/W */ -typedef struct -{ - LANGGROUPLOCALE_ENUMPROCA procA; - LANGGROUPLOCALE_ENUMPROCW procW; - DWORD dwFlags; - LGRPID lgrpid; - LONG_PTR lParam; -} ENUMLANGUAGEGROUPLOCALE_CALLBACKS; - -/* Internal implementation of EnumLanguageGrouplocalesA/W */ -static BOOL NLS_EnumLanguageGroupLocales(ENUMLANGUAGEGROUPLOCALE_CALLBACKS *lpProcs) -{ - static const WCHAR szAlternateSortsKeyName[] = { - 'A','l','t','e','r','n','a','t','e',' ','S','o','r','t','s','\0' - }; - WCHAR szNumber[10], szValue[4]; - HANDLE hKey; - BOOL bContinue = TRUE, bAlternate = FALSE; - LGRPID lgrpid; - ULONG ulIndex = 1; /* Ignore default entry of 1st key */ - - if (!lpProcs || !lpProcs->lgrpid || lpProcs->lgrpid > LGRPID_ARMENIAN) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - if (lpProcs->dwFlags) - { - SetLastError(ERROR_INVALID_FLAGS); - return FALSE; - } - - hKey = NLS_RegOpenKey( 0, szLocaleKeyName ); - - if (!hKey) - { - DPRINT1("NLS_RegOpenKey() failed\n"); - return FALSE; - } - - while (bContinue) - { - if (NLS_RegEnumValue( hKey, ulIndex, szNumber, sizeof(szNumber), - szValue, sizeof(szValue) )) - { - lgrpid = wcstoul( szValue, NULL, 16 ); - - DPRINT("lcid %s, grpid %d (%smatched)\n", szNumber, - lgrpid, lgrpid == lpProcs->lgrpid ? "" : "not "); - - if (lgrpid == lpProcs->lgrpid) - { - LCID lcid; - - lcid = wcstoul( szNumber, NULL, 16 ); - - /* FIXME: native returns extra text for a few (17/150) locales, e.g: - * '00000437 ;Georgian' - * At present we only pass the LCID string. - */ - - if (lpProcs->procW) - bContinue = lpProcs->procW( lgrpid, lcid, szNumber, lpProcs->lParam ); - else - { - char szNumberA[sizeof(szNumber)/sizeof(WCHAR)]; - - WideCharToMultiByte(CP_ACP, 0, szNumber, -1, szNumberA, sizeof(szNumberA), 0, 0); - - bContinue = lpProcs->procA( lgrpid, lcid, szNumberA, lpProcs->lParam ); - } - } - - ulIndex++; - } - else - { - /* Finished enumerating this key */ - if (!bAlternate) - { - /* Enumerate alternate sorts also */ - hKey = NLS_RegOpenKey( hKey, szAlternateSortsKeyName ); - bAlternate = TRUE; - ulIndex = 0; - } - else - bContinue = FALSE; /* Finished both keys */ - } - - if (!bContinue) - break; - } - - if (hKey) - NtClose( hKey ); - - return TRUE; -} - - -/* - * @implemented - */ -BOOL -WINAPI -EnumLanguageGroupLocalesA( - LANGGROUPLOCALE_ENUMPROCA lpLangGroupLocaleEnumProc, - LGRPID LanguageGroup, - DWORD dwFlags, - LONG_PTR lParam) -{ - ENUMLANGUAGEGROUPLOCALE_CALLBACKS callbacks; - - DPRINT("(%p,0x%08X,0x%08X,0x%08lX)\n", lpLangGroupLocaleEnumProc, LanguageGroup, dwFlags, lParam); - - callbacks.procA = lpLangGroupLocaleEnumProc; - callbacks.procW = NULL; - callbacks.dwFlags = dwFlags; - callbacks.lgrpid = LanguageGroup; - callbacks.lParam = lParam; - - return NLS_EnumLanguageGroupLocales( lpLangGroupLocaleEnumProc ? &callbacks : NULL ); -} - - -/* - * @implemented - */ -BOOL -WINAPI -EnumLanguageGroupLocalesW( - LANGGROUPLOCALE_ENUMPROCW lpLangGroupLocaleEnumProc, - LGRPID LanguageGroup, - DWORD dwFlags, - LONG_PTR lParam) -{ - ENUMLANGUAGEGROUPLOCALE_CALLBACKS callbacks; - - DPRINT("(%p,0x%08X,0x%08X,0x%08lX)\n", lpLangGroupLocaleEnumProc, LanguageGroup, dwFlags, lParam); - - callbacks.procA = NULL; - callbacks.procW = lpLangGroupLocaleEnumProc; - callbacks.dwFlags = dwFlags; - callbacks.lgrpid = LanguageGroup; - callbacks.lParam = lParam; - - return NLS_EnumLanguageGroupLocales( lpLangGroupLocaleEnumProc ? &callbacks : NULL ); -} - - -/* Callback function ptrs for EnumSystemCodePagesA/W */ -typedef struct -{ - CODEPAGE_ENUMPROCA procA; - CODEPAGE_ENUMPROCW procW; - DWORD dwFlags; -} ENUMSYSTEMCODEPAGES_CALLBACKS; - -/* Internal implementation of EnumSystemCodePagesA/W */ -static BOOL NLS_EnumSystemCodePages(ENUMSYSTEMCODEPAGES_CALLBACKS *lpProcs) -{ - WCHAR szNumber[5 + 1], szValue[MAX_PATH]; - HANDLE hKey; - BOOL bContinue = TRUE; - ULONG ulIndex = 0; - - if (!lpProcs) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - switch (lpProcs->dwFlags) - { - case CP_INSTALLED: - case CP_SUPPORTED: - break; - default: - SetLastError(ERROR_INVALID_FLAGS); - return FALSE; - } - - hKey = NLS_RegOpenKey(0, L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage"); - if (!hKey) - { - DPRINT1("NLS_RegOpenKey() failed\n"); - return FALSE; - } - - while (bContinue) - { - if (NLS_RegEnumValue(hKey, ulIndex, szNumber, sizeof(szNumber), - szValue, sizeof(szValue))) - { - if ((lpProcs->dwFlags == CP_SUPPORTED)|| - ((lpProcs->dwFlags == CP_INSTALLED)&&(wcslen(szValue) > 2))) - { - if (lpProcs->procW) - { - bContinue = lpProcs->procW(szNumber); - } - else - { - char szNumberA[sizeof(szNumber)/sizeof(WCHAR)]; - - WideCharToMultiByte(CP_ACP, 0, szNumber, -1, szNumberA, sizeof(szNumberA), 0, 0); - bContinue = lpProcs->procA(szNumberA); - } - } - - ulIndex++; - - } else bContinue = FALSE; - - if (!bContinue) - break; - } - - if (hKey) - NtClose(hKey); - - return TRUE; -} - -/* - * @implemented - */ -BOOL -WINAPI -EnumSystemCodePagesW ( - CODEPAGE_ENUMPROCW lpCodePageEnumProc, - DWORD dwFlags - ) -{ - ENUMSYSTEMCODEPAGES_CALLBACKS procs; - - DPRINT("(%p,0x%08X,0x%08lX)\n", lpCodePageEnumProc, dwFlags); - - procs.procA = NULL; - procs.procW = lpCodePageEnumProc; - procs.dwFlags = dwFlags; - - return NLS_EnumSystemCodePages(lpCodePageEnumProc ? &procs : NULL); -} - - -/* - * @implemented - */ -BOOL -WINAPI -EnumSystemCodePagesA ( - CODEPAGE_ENUMPROCA lpCodePageEnumProc, - DWORD dwFlags - ) -{ - ENUMSYSTEMCODEPAGES_CALLBACKS procs; - - DPRINT("(%p,0x%08X,0x%08lX)\n", lpCodePageEnumProc, dwFlags); - - procs.procA = lpCodePageEnumProc; - procs.procW = NULL; - procs.dwFlags = dwFlags; - - return NLS_EnumSystemCodePages(lpCodePageEnumProc ? &procs : NULL); -} - - -/* - * @implemented - */ -BOOL -WINAPI -EnumSystemGeoID( - GEOCLASS GeoClass, - GEOID ParentGeoId, // reserved - GEO_ENUMPROC lpGeoEnumProc) -{ - WCHAR szNumber[5 + 1]; - ULONG ulIndex = 0; - HANDLE hKey; - - DPRINT("(0x%08X,0x%08X,%p)\n", GeoClass, ParentGeoId, lpGeoEnumProc); - - if(!lpGeoEnumProc || GeoClass != GEOCLASS_NATION) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - hKey = NLS_RegOpenKey(0, L"\\REGISTRY\\Machine\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Country List"); - if (!hKey) - { - DPRINT1("NLS_RegOpenKey() failed\n"); - return FALSE; - } - - while (NLS_RegEnumSubKey(hKey, ulIndex, szNumber, sizeof(szNumber))) - { - BOOL bContinue = TRUE; - DWORD dwGeoId; - HANDLE hSubKey = NLS_RegOpenKey(hKey, szNumber); - - if (hSubKey) - { - if (NLS_RegGetDword(hSubKey, L"CountryCode", &dwGeoId)) - { - if (!lpGeoEnumProc(dwGeoId)) - bContinue = FALSE; - } - - NtClose(hSubKey); - } - - if (!bContinue) - break; - - ulIndex++; - } - - if (hKey) - NtClose(hKey); - - return TRUE; -} - - -/* Callback function ptrs for EnumSystemLanguageGroupsA/W */ -typedef struct -{ - LANGUAGEGROUP_ENUMPROCA procA; - LANGUAGEGROUP_ENUMPROCW procW; - DWORD dwFlags; - LONG_PTR lParam; -} ENUMLANGUAGEGROUP_CALLBACKS; - - -/* Internal implementation of EnumSystemLanguageGroupsA/W */ -static BOOL NLS_EnumSystemLanguageGroups(ENUMLANGUAGEGROUP_CALLBACKS *lpProcs) -{ - WCHAR szNumber[10], szValue[4]; - HANDLE hKey; - BOOL bContinue = TRUE; - ULONG ulIndex = 0; - - if (!lpProcs) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - switch (lpProcs->dwFlags) - { - case 0: - /* Default to LGRPID_INSTALLED */ - lpProcs->dwFlags = LGRPID_INSTALLED; - /* Fall through... */ - case LGRPID_INSTALLED: - case LGRPID_SUPPORTED: + lcid = GetUserDefaultLCID(); break; default: - SetLastError(ERROR_INVALID_FLAGS); - return FALSE; - } - - hKey = NLS_RegOpenKey( 0, szLangGroupsKeyName ); - - if (!hKey) - { - DPRINT1("NLS_RegOpenKey() failed, KeyName='%S'\n", szLangGroupsKeyName); - return FALSE; - } - - while (bContinue) - { - if (NLS_RegEnumValue( hKey, ulIndex, szNumber, sizeof(szNumber), - szValue, sizeof(szValue) )) + /* Replace SUBLANG_NEUTRAL with SUBLANG_DEFAULT */ + langid = LANGIDFROMLCID(lcid); + if (SUBLANGID(langid) == SUBLANG_NEUTRAL) { - BOOL bInstalled = szValue[0] == '1' ? TRUE : FALSE; - LGRPID lgrpid = wcstoul( szNumber, NULL, 16 ); - - DPRINT("grpid %s (%sinstalled)\n", szNumber, - bInstalled ? "" : "not "); - - if (lpProcs->dwFlags == LGRPID_SUPPORTED || bInstalled) - { - WCHAR szGrpName[48]; - - if (!NLS_GetLanguageGroupName( lgrpid, szGrpName, sizeof(szGrpName) / sizeof(WCHAR) )) - szGrpName[0] = '\0'; - - if (lpProcs->procW) - bContinue = lpProcs->procW( lgrpid, szNumber, szGrpName, lpProcs->dwFlags, - lpProcs->lParam ); - else - { - char szNumberA[sizeof(szNumber)/sizeof(WCHAR)]; - char szGrpNameA[48]; - - /* FIXME: MSDN doesn't say which code page the W->A translation uses, - * or whether the language names are ever localised. Assume CP_ACP. - */ - - WideCharToMultiByte(CP_ACP, 0, szNumber, -1, szNumberA, sizeof(szNumberA), 0, 0); - WideCharToMultiByte(CP_ACP, 0, szGrpName, -1, szGrpNameA, sizeof(szGrpNameA), 0, 0); - - bContinue = lpProcs->procA( lgrpid, szNumberA, szGrpNameA, lpProcs->dwFlags, - lpProcs->lParam ); - } - } - - ulIndex++; + langid = MAKELANGID(PRIMARYLANGID(langid), SUBLANG_DEFAULT); + lcid = MAKELCID(langid, SORTIDFROMLCID(lcid)); } - else - bContinue = FALSE; - - if (!bContinue) - break; } - - if (hKey) - NtClose( hKey ); - - return TRUE; + return lcid; } -/* - * @implemented +/****************************************************************************** + * IsValidLocale (KERNEL32.@) + * + * Determine if a locale is valid. + * + * PARAMS + * lcid [I] LCID of the locale to check + * flags [I] LCID_SUPPORTED = Valid, LCID_INSTALLED = Valid and installed on the system + * + * RETURNS + * TRUE, if lcid is valid, + * FALSE, otherwise. + * + * NOTES + * Wine does not currently make the distinction between supported and installed. All + * languages supported are installed by default. */ -BOOL -WINAPI -EnumSystemLanguageGroupsA( - LANGUAGEGROUP_ENUMPROCA pLangGroupEnumProc, - DWORD dwFlags, - LONG_PTR lParam) +BOOL WINAPI IsValidLocale( LCID lcid, DWORD flags ) { - ENUMLANGUAGEGROUP_CALLBACKS procs; - - DPRINT("(%p,0x%08X,0x%08lX)\n", pLangGroupEnumProc, dwFlags, lParam); - - procs.procA = pLangGroupEnumProc; - procs.procW = NULL; - procs.dwFlags = dwFlags; - procs.lParam = lParam; - - return NLS_EnumSystemLanguageGroups( pLangGroupEnumProc ? &procs : NULL); + /* check if language is registered in the kernel32 resources */ + return FindResourceExW( kernel32_handle, (LPWSTR)RT_STRING, + (LPCWSTR)LOCALE_ILANGUAGE, LANGIDFROMLCID(lcid)) != 0; } -/* - * @implemented - */ -BOOL -WINAPI -EnumSystemLanguageGroupsW( - LANGUAGEGROUP_ENUMPROCW pLangGroupEnumProc, - DWORD dwFlags, - LONG_PTR lParam) +static BOOL CALLBACK enum_lang_proc_a( HMODULE hModule, LPCSTR type, + LPCSTR name, WORD LangID, LONG_PTR lParam ) { - ENUMLANGUAGEGROUP_CALLBACKS procs; - - DPRINT("(%p,0x%08X,0x%08lX)\n", pLangGroupEnumProc, dwFlags, lParam); - - procs.procA = NULL; - procs.procW = pLangGroupEnumProc; - procs.dwFlags = dwFlags; - procs.lParam = lParam; - - return NLS_EnumSystemLanguageGroups( pLangGroupEnumProc ? &procs : NULL); -} - - -/* Callback function ptrs for EnumSystemLocalesA/W */ -typedef struct -{ - LOCALE_ENUMPROCA procA; - LOCALE_ENUMPROCW procW; - DWORD dwFlags; -} ENUMSYSTEMLOCALES_CALLBACKS; - - -/* Internal implementation of EnumSystemLocalesA/W */ -static BOOL NLS_EnumSystemLocales(ENUMSYSTEMLOCALES_CALLBACKS *lpProcs) -{ - WCHAR szNumber[10], szValue[4]; - HANDLE hKey; - BOOL bContinue = TRUE; - ULONG ulIndex = 0; - - if (!lpProcs) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - /* Passing 0 flags behaves like LCID_SUPPORTED */ - if (lpProcs->dwFlags == 0) - { - lpProcs->dwFlags = LCID_SUPPORTED; - } - - switch (lpProcs->dwFlags) - { - case LCID_ALTERNATE_SORTS: - case LCID_INSTALLED: - case LCID_SUPPORTED: - break; - default: - SetLastError(ERROR_INVALID_FLAGS); - return FALSE; - } - - hKey = NLS_RegOpenKey(0, L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Nls\\Locale"); - - if (!hKey) - { - DPRINT1("NLS_RegOpenKey() failed\n"); - return FALSE; - } - - while (bContinue) - { - if (NLS_RegEnumValue( hKey, ulIndex, szNumber, sizeof(szNumber), - szValue, sizeof(szValue))) - { - if ((lpProcs->dwFlags == LCID_SUPPORTED)|| - ((lpProcs->dwFlags == LCID_INSTALLED)&&(wcslen(szValue) > 0))) - { - if (lpProcs->procW) - { - bContinue = lpProcs->procW(szNumber); - } - else - { - char szNumberA[sizeof(szNumber)/sizeof(WCHAR)]; - - WideCharToMultiByte(CP_ACP, 0, szNumber, -1, szNumberA, sizeof(szNumberA), 0, 0); - bContinue = lpProcs->procA(szNumberA); - } - } - - ulIndex++; - } - else - bContinue = FALSE; - - if (!bContinue) - break; - } - - if (hKey) - NtClose(hKey); - - return TRUE; -} - -/* - * @implemented - */ -BOOL -WINAPI -EnumSystemLocalesA ( - LOCALE_ENUMPROCA lpLocaleEnumProc, - DWORD dwFlags - ) -{ - ENUMSYSTEMLOCALES_CALLBACKS procs; - - DPRINT("(%p,0x%08X)\n", lpLocaleEnumProc, dwFlags); - - procs.procA = lpLocaleEnumProc; - procs.procW = NULL; - procs.dwFlags = dwFlags; - - return NLS_EnumSystemLocales(lpLocaleEnumProc ? &procs : NULL); -} - - -/* - * @implemented - */ -BOOL -WINAPI -EnumSystemLocalesW ( - LOCALE_ENUMPROCW lpLocaleEnumProc, - DWORD dwFlags - ) -{ - ENUMSYSTEMLOCALES_CALLBACKS procs; - - DPRINT("(%p,0x%08X)\n", lpLocaleEnumProc, dwFlags); - - procs.procA = NULL; - procs.procW = lpLocaleEnumProc; - procs.dwFlags = dwFlags; - - return NLS_EnumSystemLocales(lpLocaleEnumProc ? &procs : NULL); -} - - -static BOOL CALLBACK enum_uilang_proc_a( HMODULE hModule, LPCSTR type, - LPCSTR name, WORD LangID, LONG_PTR lParam ) -{ - ENUM_UILANG_CALLBACK *enum_uilang = (ENUM_UILANG_CALLBACK *)lParam; + LOCALE_ENUMPROCA lpfnLocaleEnum = (LOCALE_ENUMPROCA)lParam; char buf[20]; sprintf(buf, "%08x", (UINT)LangID); - return enum_uilang->u.procA( buf, enum_uilang->param ); + return lpfnLocaleEnum( buf ); } - -/* - * @implemented - */ -BOOL -WINAPI -EnumUILanguagesA( - UILANGUAGE_ENUMPROCA lpUILanguageEnumProc, - DWORD dwFlags, - LONG_PTR lParam) -{ - ENUM_UILANG_CALLBACK enum_uilang; - - DPRINT("%p, %x, %lx\n", lpUILanguageEnumProc, dwFlags, lParam); - - if(!lpUILanguageEnumProc) { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - if(dwFlags) { - SetLastError(ERROR_INVALID_FLAGS); - return FALSE; - } - - enum_uilang.u.procA = lpUILanguageEnumProc; - enum_uilang.flags = dwFlags; - enum_uilang.param = lParam; - - EnumResourceLanguagesA( hCurrentModule, (LPCSTR)RT_STRING, - (LPCSTR)LOCALE_ILANGUAGE, enum_uilang_proc_a, - (LONG_PTR)&enum_uilang); - return TRUE; -} - -static BOOL CALLBACK enum_uilang_proc_w( HMODULE hModule, LPCWSTR type, - LPCWSTR name, WORD LangID, LONG_PTR lParam ) +static BOOL CALLBACK enum_lang_proc_w( HMODULE hModule, LPCWSTR type, + LPCWSTR name, WORD LangID, LONG_PTR lParam ) { static const WCHAR formatW[] = {'%','0','8','x',0}; - ENUM_UILANG_CALLBACK *enum_uilang = (ENUM_UILANG_CALLBACK *)lParam; + LOCALE_ENUMPROCW lpfnLocaleEnum = (LOCALE_ENUMPROCW)lParam; WCHAR buf[20]; - - swprintf( buf, formatW, (UINT)LangID ); - return enum_uilang->u.procW( buf, enum_uilang->param ); + sprintfW( buf, formatW, (UINT)LangID ); + return lpfnLocaleEnum( buf ); } -/* - * @implemented +/****************************************************************************** + * EnumSystemLocalesA (KERNEL32.@) + * + * Call a users function for each locale available on the system. + * + * PARAMS + * lpfnLocaleEnum [I] Callback function to call for each locale + * dwFlags [I] LOCALE_SUPPORTED=All supported, LOCALE_INSTALLED=Installed only + * + * RETURNS + * Success: TRUE. + * Failure: FALSE. Use GetLastError() to determine the cause. */ -BOOL -WINAPI -EnumUILanguagesW( - UILANGUAGE_ENUMPROCW lpUILanguageEnumProc, - DWORD dwFlags, - LONG_PTR lParam) +BOOL WINAPI EnumSystemLocalesA( LOCALE_ENUMPROCA lpfnLocaleEnum, DWORD dwFlags ) { - ENUM_UILANG_CALLBACK enum_uilang; - - DPRINT("%p, %x, %lx\n", lpUILanguageEnumProc, dwFlags, lParam); - - - if(!lpUILanguageEnumProc) { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - if(dwFlags) { - SetLastError(ERROR_INVALID_FLAGS); - return FALSE; - } - - enum_uilang.u.procW = lpUILanguageEnumProc; - enum_uilang.flags = dwFlags; - enum_uilang.param = lParam; - - EnumResourceLanguagesW( hCurrentModule, (LPCWSTR)RT_STRING, - (LPCWSTR)LOCALE_ILANGUAGE, enum_uilang_proc_w, - (LONG_PTR)&enum_uilang); + TRACE("(%p,%08x)\n", lpfnLocaleEnum, dwFlags); + EnumResourceLanguagesA( kernel32_handle, (LPSTR)RT_STRING, + (LPCSTR)LOCALE_ILANGUAGE, enum_lang_proc_a, + (LONG_PTR)lpfnLocaleEnum); return TRUE; } -/* - * @implemented + +/****************************************************************************** + * EnumSystemLocalesW (KERNEL32.@) + * + * See EnumSystemLocalesA. */ -int -WINAPI -GetCalendarInfoA( - LCID lcid, - CALID Calendar, - CALTYPE CalType, - LPSTR lpCalData, - int cchData, - LPDWORD lpValue - ) +BOOL WINAPI EnumSystemLocalesW( LOCALE_ENUMPROCW lpfnLocaleEnum, DWORD dwFlags ) { - int ret; - LPWSTR lpCalDataW = NULL; - - if (NLS_IsUnicodeOnlyLcid(lcid)) - { - SetLastError(ERROR_INVALID_PARAMETER); - return 0; - } - - if (cchData && - !(lpCalDataW = HeapAlloc(GetProcessHeap(), 0, cchData*sizeof(WCHAR)))) - return 0; - - ret = GetCalendarInfoW(lcid, Calendar, CalType, lpCalDataW, cchData, lpValue); - if(ret && lpCalDataW && lpCalData) - WideCharToMultiByte(CP_ACP, 0, lpCalDataW, cchData, lpCalData, cchData, NULL, NULL); - HeapFree(GetProcessHeap(), 0, lpCalDataW); - - return ret; -} - - -/* - * @unimplemented - */ -int -WINAPI -GetCalendarInfoW( - LCID Locale, - CALID Calendar, - CALTYPE CalType, - LPWSTR lpCalData, - int cchData, - LPDWORD lpValue) -{ - if (CalType & CAL_NOUSEROVERRIDE) - DPRINT("FIXME: flag CAL_NOUSEROVERRIDE used, not fully implemented\n"); - if (CalType & CAL_USE_CP_ACP) - DPRINT("FIXME: flag CAL_USE_CP_ACP used, not fully implemented\n"); - - if (CalType & CAL_RETURN_NUMBER) { - if (lpCalData != NULL) - DPRINT("WARNING: lpCalData not NULL (%p) when it should!\n", lpCalData); - if (cchData != 0) - DPRINT("WARNING: cchData not 0 (%d) when it should!\n", cchData); - } else { - if (lpValue != NULL) - DPRINT("WARNING: lpValue not NULL (%p) when it should!\n", lpValue); - } - - /* FIXME: No verification is made yet wrt Locale - * for the CALTYPES not requiring GetLocaleInfoA */ - switch (CalType & ~(CAL_NOUSEROVERRIDE|CAL_RETURN_NUMBER|CAL_USE_CP_ACP)) { - case CAL_ICALINTVALUE: - DPRINT("FIXME: Unimplemented caltype %d\n", CalType & 0xffff); - return E_FAIL; - case CAL_SCALNAME: - DPRINT("FIXME: Unimplemented caltype %d\n", CalType & 0xffff); - return E_FAIL; - case CAL_IYEAROFFSETRANGE: - DPRINT("FIXME: Unimplemented caltype %d\n", CalType & 0xffff); - return E_FAIL; - case CAL_SERASTRING: - DPRINT("FIXME: Unimplemented caltype %d\n", CalType & 0xffff); - return E_FAIL; - case CAL_SSHORTDATE: - return GetLocaleInfoW(Locale, LOCALE_SSHORTDATE, lpCalData, cchData); - case CAL_SLONGDATE: - return GetLocaleInfoW(Locale, LOCALE_SLONGDATE, lpCalData, cchData); - case CAL_SDAYNAME1: - return GetLocaleInfoW(Locale, LOCALE_SDAYNAME1, lpCalData, cchData); - case CAL_SDAYNAME2: - return GetLocaleInfoW(Locale, LOCALE_SDAYNAME2, lpCalData, cchData); - case CAL_SDAYNAME3: - return GetLocaleInfoW(Locale, LOCALE_SDAYNAME3, lpCalData, cchData); - case CAL_SDAYNAME4: - return GetLocaleInfoW(Locale, LOCALE_SDAYNAME4, lpCalData, cchData); - case CAL_SDAYNAME5: - return GetLocaleInfoW(Locale, LOCALE_SDAYNAME5, lpCalData, cchData); - case CAL_SDAYNAME6: - return GetLocaleInfoW(Locale, LOCALE_SDAYNAME6, lpCalData, cchData); - case CAL_SDAYNAME7: - return GetLocaleInfoW(Locale, LOCALE_SDAYNAME7, lpCalData, cchData); - case CAL_SABBREVDAYNAME1: - return GetLocaleInfoW(Locale, LOCALE_SABBREVDAYNAME1, lpCalData, cchData); - case CAL_SABBREVDAYNAME2: - return GetLocaleInfoW(Locale, LOCALE_SABBREVDAYNAME2, lpCalData, cchData); - case CAL_SABBREVDAYNAME3: - return GetLocaleInfoW(Locale, LOCALE_SABBREVDAYNAME3, lpCalData, cchData); - case CAL_SABBREVDAYNAME4: - return GetLocaleInfoW(Locale, LOCALE_SABBREVDAYNAME4, lpCalData, cchData); - case CAL_SABBREVDAYNAME5: - return GetLocaleInfoW(Locale, LOCALE_SABBREVDAYNAME5, lpCalData, cchData); - case CAL_SABBREVDAYNAME6: - return GetLocaleInfoW(Locale, LOCALE_SABBREVDAYNAME6, lpCalData, cchData); - case CAL_SABBREVDAYNAME7: - return GetLocaleInfoW(Locale, LOCALE_SABBREVDAYNAME7, lpCalData, cchData); - case CAL_SMONTHNAME1: - return GetLocaleInfoW(Locale, LOCALE_SMONTHNAME1, lpCalData, cchData); - case CAL_SMONTHNAME2: - return GetLocaleInfoW(Locale, LOCALE_SMONTHNAME2, lpCalData, cchData); - case CAL_SMONTHNAME3: - return GetLocaleInfoW(Locale, LOCALE_SMONTHNAME3, lpCalData, cchData); - case CAL_SMONTHNAME4: - return GetLocaleInfoW(Locale, LOCALE_SMONTHNAME4, lpCalData, cchData); - case CAL_SMONTHNAME5: - return GetLocaleInfoW(Locale, LOCALE_SMONTHNAME5, lpCalData, cchData); - case CAL_SMONTHNAME6: - return GetLocaleInfoW(Locale, LOCALE_SMONTHNAME6, lpCalData, cchData); - case CAL_SMONTHNAME7: - return GetLocaleInfoW(Locale, LOCALE_SMONTHNAME7, lpCalData, cchData); - case CAL_SMONTHNAME8: - return GetLocaleInfoW(Locale, LOCALE_SMONTHNAME8, lpCalData, cchData); - case CAL_SMONTHNAME9: - return GetLocaleInfoW(Locale, LOCALE_SMONTHNAME9, lpCalData, cchData); - case CAL_SMONTHNAME10: - return GetLocaleInfoW(Locale, LOCALE_SMONTHNAME10, lpCalData, cchData); - case CAL_SMONTHNAME11: - return GetLocaleInfoW(Locale, LOCALE_SMONTHNAME11, lpCalData, cchData); - case CAL_SMONTHNAME12: - return GetLocaleInfoW(Locale, LOCALE_SMONTHNAME12, lpCalData, cchData); - case CAL_SMONTHNAME13: - return GetLocaleInfoW(Locale, LOCALE_SMONTHNAME13, lpCalData, cchData); - case CAL_SABBREVMONTHNAME1: - return GetLocaleInfoW(Locale, LOCALE_SABBREVMONTHNAME1, lpCalData, cchData); - case CAL_SABBREVMONTHNAME2: - return GetLocaleInfoW(Locale, LOCALE_SABBREVMONTHNAME2, lpCalData, cchData); - case CAL_SABBREVMONTHNAME3: - return GetLocaleInfoW(Locale, LOCALE_SABBREVMONTHNAME3, lpCalData, cchData); - case CAL_SABBREVMONTHNAME4: - return GetLocaleInfoW(Locale, LOCALE_SABBREVMONTHNAME4, lpCalData, cchData); - case CAL_SABBREVMONTHNAME5: - return GetLocaleInfoW(Locale, LOCALE_SABBREVMONTHNAME5, lpCalData, cchData); - case CAL_SABBREVMONTHNAME6: - return GetLocaleInfoW(Locale, LOCALE_SABBREVMONTHNAME6, lpCalData, cchData); - case CAL_SABBREVMONTHNAME7: - return GetLocaleInfoW(Locale, LOCALE_SABBREVMONTHNAME7, lpCalData, cchData); - case CAL_SABBREVMONTHNAME8: - return GetLocaleInfoW(Locale, LOCALE_SABBREVMONTHNAME8, lpCalData, cchData); - case CAL_SABBREVMONTHNAME9: - return GetLocaleInfoW(Locale, LOCALE_SABBREVMONTHNAME9, lpCalData, cchData); - case CAL_SABBREVMONTHNAME10: - return GetLocaleInfoW(Locale, LOCALE_SABBREVMONTHNAME10, lpCalData, cchData); - case CAL_SABBREVMONTHNAME11: - return GetLocaleInfoW(Locale, LOCALE_SABBREVMONTHNAME11, lpCalData, cchData); - case CAL_SABBREVMONTHNAME12: - return GetLocaleInfoW(Locale, LOCALE_SABBREVMONTHNAME12, lpCalData, cchData); - case CAL_SABBREVMONTHNAME13: - return GetLocaleInfoW(Locale, LOCALE_SABBREVMONTHNAME13, lpCalData, cchData); - case CAL_SYEARMONTH: - return GetLocaleInfoW(Locale, LOCALE_SYEARMONTH, lpCalData, cchData); - case CAL_ITWODIGITYEARMAX: - if (lpValue) *lpValue = CALINFO_MAX_YEAR; - break; - default: DPRINT("Unknown caltype %d\n",CalType & 0xffff); - return E_FAIL; - } - return 0; -} - - -/* - * @implemented - */ -BOOL -WINAPI -GetCPInfo(UINT CodePage, - LPCPINFO CodePageInfo) -{ - PCODEPAGE_ENTRY CodePageEntry; - - if (!CodePageInfo) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - CodePageEntry = IntGetCodePageEntry(CodePage); - if (CodePageEntry == NULL) - { - switch(CodePage) - { - case CP_UTF7: - case CP_UTF8: - CodePageInfo->DefaultChar[0] = 0x3f; - CodePageInfo->DefaultChar[1] = 0; - CodePageInfo->LeadByte[0] = CodePageInfo->LeadByte[1] = 0; - CodePageInfo->MaxCharSize = (CodePage == CP_UTF7) ? 5 : 4; - return TRUE; - } - - SetLastError( ERROR_INVALID_PARAMETER ); - return FALSE; - } - - if (CodePageEntry->CodePageTable.DefaultChar & 0xff00) - { - CodePageInfo->DefaultChar[0] = (CodePageEntry->CodePageTable.DefaultChar & 0xff00) >> 8; - CodePageInfo->DefaultChar[1] = CodePageEntry->CodePageTable.DefaultChar & 0x00ff; - } - else - { - CodePageInfo->DefaultChar[0] = CodePageEntry->CodePageTable.DefaultChar & 0xff; - CodePageInfo->DefaultChar[1] = 0; - } - - if ((CodePageInfo->MaxCharSize = CodePageEntry->CodePageTable.MaximumCharacterSize) == 2) - memcpy(CodePageInfo->LeadByte, CodePageEntry->CodePageTable.LeadByte, sizeof(CodePageInfo->LeadByte)); - else - CodePageInfo->LeadByte[0] = CodePageInfo->LeadByte[1] = 0; - + TRACE("(%p,%08x)\n", lpfnLocaleEnum, dwFlags); + EnumResourceLanguagesW( kernel32_handle, (LPWSTR)RT_STRING, + (LPCWSTR)LOCALE_ILANGUAGE, enum_lang_proc_w, + (LONG_PTR)lpfnLocaleEnum); return TRUE; } -static BOOL -GetLocalisedText(DWORD dwResId, WCHAR *lpszDest) -{ - HRSRC hrsrc; - LCID lcid; - LANGID langId; - DWORD dwId; - - if (dwResId == 37) - dwId = dwResId * 100; - else - dwId = dwResId; - - lcid = GetUserDefaultLCID(); - lcid = ConvertDefaultLocale(lcid); - - langId = LANGIDFROMLCID(lcid); - - if (PRIMARYLANGID(langId) == LANG_NEUTRAL) - langId = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US); - - hrsrc = FindResourceExW(hCurrentModule, - (LPWSTR)RT_STRING, - MAKEINTRESOURCEW((dwId >> 4) + 1), - langId); - if (hrsrc) - { - HGLOBAL hmem = LoadResource(hCurrentModule, hrsrc); - - if (hmem) - { - const WCHAR *p; - unsigned int i; - - p = LockResource(hmem); - for (i = 0; i < (dwId & 0x0f); i++) p += *p + 1; - - memcpy(lpszDest, p + 1, *p * sizeof(WCHAR)); - lpszDest[*p] = '\0'; - - return TRUE; - } - } - - DPRINT1("Could not get codepage name. dwResId = %ld\n", dwResId); - return FALSE; -} - -/* - * @implemented +/*********************************************************************** + * VerLanguageNameA (KERNEL32.@) + * + * Get the name of a language. + * + * PARAMS + * wLang [I] LANGID of the language + * szLang [O] Destination for the language name + * + * RETURNS + * Success: The size of the language name. If szLang is non-NULL, it is filled + * with the name. + * Failure: 0. Use GetLastError() to determine the cause. + * */ -BOOL -WINAPI -GetCPInfoExW(UINT CodePage, - DWORD dwFlags, - LPCPINFOEXW lpCPInfoEx) +DWORD WINAPI VerLanguageNameA( DWORD wLang, LPSTR szLang, DWORD nSize ) { - if (!GetCPInfo(CodePage, (LPCPINFO) lpCPInfoEx)) - return FALSE; - - switch(CodePage) - { - case CP_UTF7: - { - lpCPInfoEx->CodePage = CP_UTF7; - lpCPInfoEx->UnicodeDefaultChar = 0x3f; - return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName); - } - break; - - case CP_UTF8: - { - lpCPInfoEx->CodePage = CP_UTF8; - lpCPInfoEx->UnicodeDefaultChar = 0x3f; - return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName); - } - - default: - { - PCODEPAGE_ENTRY CodePageEntry; - - CodePageEntry = IntGetCodePageEntry(CodePage); - if (CodePageEntry == NULL) - { - DPRINT1("Could not get CodePage Entry! CodePageEntry = 0\n"); - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - lpCPInfoEx->CodePage = CodePageEntry->CodePageTable.CodePage; - lpCPInfoEx->UnicodeDefaultChar = CodePageEntry->CodePageTable.UniDefaultChar; - return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName); - } - break; - } + return GetLocaleInfoA( MAKELCID(wLang, SORT_DEFAULT), LOCALE_SENGLANGUAGE, szLang, nSize ); } -/* - * @implemented - */ -BOOL -WINAPI -GetCPInfoExA(UINT CodePage, - DWORD dwFlags, - LPCPINFOEXA lpCPInfoEx) -{ - CPINFOEXW CPInfo; - - if (!GetCPInfoExW(CodePage, dwFlags, &CPInfo)) - return FALSE; - - /* the layout is the same except for CodePageName */ - memcpy(lpCPInfoEx, &CPInfo, sizeof(CPINFOEXA)); - - WideCharToMultiByte(CP_ACP, - 0, - CPInfo.CodePageName, - -1, - lpCPInfoEx->CodePageName, - sizeof(lpCPInfoEx->CodePageName), - NULL, - NULL); - return TRUE; -} - -static int -NLS_GetGeoFriendlyName(GEOID Location, LPWSTR szFriendlyName, int cchData) -{ - HANDLE hKey; - WCHAR szPath[MAX_PATH]; - UNICODE_STRING ValueName; - KEY_VALUE_PARTIAL_INFORMATION *info; - static const int info_size = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data); - DWORD dwSize; - NTSTATUS Status; - int Ret; - - swprintf(szPath, L"\\REGISTRY\\Machine\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Country List\\%d", Location); - - hKey = NLS_RegOpenKey(0, szPath); - if (!hKey) - { - DPRINT1("NLS_RegOpenKey() failed\n"); - return 0; - } - - dwSize = info_size + cchData * sizeof(WCHAR); - - if (!(info = HeapAlloc(GetProcessHeap(), 0, dwSize))) - { - NtClose(hKey); - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return 0; - } - - RtlInitUnicodeString(&ValueName, L"Name"); - - Status = NtQueryValueKey(hKey, &ValueName, KeyValuePartialInformation, - (LPBYTE)info, dwSize, &dwSize); - - if (!Status) - { - Ret = (dwSize - info_size) / sizeof(WCHAR); - - if (!Ret || ((WCHAR *)info->Data)[Ret-1]) - { - if (Ret < cchData || !szFriendlyName) Ret++; - else - { - SetLastError(ERROR_INSUFFICIENT_BUFFER); - Ret = 0; - } - } - - if (Ret && szFriendlyName) - { - memcpy(szFriendlyName, info->Data, (Ret-1) * sizeof(WCHAR)); - szFriendlyName[Ret-1] = 0; - } - } - else if (Status == STATUS_BUFFER_OVERFLOW && !szFriendlyName) - { - Ret = (dwSize - info_size) / sizeof(WCHAR) + 1; - } - else if (Status == STATUS_OBJECT_NAME_NOT_FOUND) - { - Ret = -1; - } - else - { - SetLastError(RtlNtStatusToDosError(Status)); - Ret = 0; - } - - NtClose(hKey); - HeapFree(GetProcessHeap(), 0, info); - - return Ret; -} - -/* - * @unimplemented - */ -int -WINAPI -GetGeoInfoW( - GEOID Location, - GEOTYPE GeoType, - LPWSTR lpGeoData, - int cchData, - LANGID LangId) -{ - DPRINT("%d %d %p %d %d\n", Location, GeoType, lpGeoData, cchData, LangId); - - if ((GeoType == GEO_TIMEZONES)||(GeoType == GEO_OFFICIALLANGUAGES)) - { - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - } - - switch (GeoType) - { - case GEO_FRIENDLYNAME: - { - return NLS_GetGeoFriendlyName(Location, lpGeoData, cchData); - } - case GEO_NATION: - case GEO_LATITUDE: - case GEO_LONGITUDE: - case GEO_ISO2: - case GEO_ISO3: - case GEO_RFC1766: - case GEO_LCID: - case GEO_OFFICIALNAME: - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - break; - } - - return 0; -} - - -/* - * @unimplemented - */ -int -WINAPI -GetGeoInfoA( - GEOID Location, - GEOTYPE GeoType, - LPSTR lpGeoData, - int cchData, - LANGID LangId) -{ - DPRINT("%d %d %p %d %d\n", Location, GeoType, lpGeoData, cchData, LangId); - - if ((GeoType == GEO_TIMEZONES)||(GeoType == GEO_OFFICIALLANGUAGES)) - { - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - } - - switch (GeoType) - { - case GEO_FRIENDLYNAME: - { - WCHAR szBuffer[MAX_PATH]; - char szBufferA[sizeof(szBuffer)/sizeof(WCHAR)]; - int Ret; - - Ret = NLS_GetGeoFriendlyName(Location, szBuffer, cchData); - - WideCharToMultiByte(CP_ACP, 0, szBuffer, -1, szBufferA, sizeof(szBufferA), 0, 0); - strcpy(lpGeoData, szBufferA); - - return Ret; - } - case GEO_NATION: - case GEO_LATITUDE: - case GEO_LONGITUDE: - case GEO_ISO2: - case GEO_ISO3: - case GEO_RFC1766: - case GEO_LCID: - case GEO_OFFICIALNAME: - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - break; - } - - return 0; -} - -const WCHAR *RosGetLocaleValueName( DWORD lctype ) -{ - switch (lctype & ~LOCALE_LOCALEINFOFLAGSMASK) - { - /* These values are used by SetLocaleInfo and GetLocaleInfo, and - * the values are stored in the registry, confirmed under Windows. - */ - case LOCALE_ICALENDARTYPE: return L"iCalendarType"; - case LOCALE_ICURRDIGITS: return L"iCurrDigits"; - case LOCALE_ICURRENCY: return L"iCurrency"; - case LOCALE_IDIGITS: return L"iDigits"; - case LOCALE_IFIRSTDAYOFWEEK: return L"iFirstDayOfWeek"; - case LOCALE_IFIRSTWEEKOFYEAR: return L"iFirstWeekOfYear"; - case LOCALE_ILZERO: return L"iLZero"; - case LOCALE_IMEASURE: return L"iMeasure"; - case LOCALE_INEGCURR: return L"iNegCurr"; - case LOCALE_INEGNUMBER: return L"iNegNumber"; - case LOCALE_IPAPERSIZE: return L"iPaperSize"; - case LOCALE_ITIME: return L"iTime"; - case LOCALE_S1159: return L"s1159"; - case LOCALE_S2359: return L"s2359"; - case LOCALE_SCURRENCY: return L"sCurrency"; - case LOCALE_SDATE: return L"sDate"; - case LOCALE_SDECIMAL: return L"sDecimal"; - case LOCALE_SGROUPING: return L"sGrouping"; - case LOCALE_SLIST: return L"sList"; - case LOCALE_SLONGDATE: return L"sLongDate"; - case LOCALE_SMONDECIMALSEP: return L"sMonDecimalSep"; - case LOCALE_SMONGROUPING: return L"sMonGrouping"; - case LOCALE_SMONTHOUSANDSEP: return L"sMonThousandSep"; - case LOCALE_SNEGATIVESIGN: return L"sNegativeSign"; - case LOCALE_SPOSITIVESIGN: return L"sPositiveSign"; - case LOCALE_SSHORTDATE: return L"sShortDate"; - case LOCALE_STHOUSAND: return L"sThousand"; - case LOCALE_STIME: return L"sTime"; - case LOCALE_STIMEFORMAT: return L"sTimeFormat"; - case LOCALE_SYEARMONTH: return L"sYearMonth"; - - /* The following are not listed under MSDN as supported, - * but seem to be used and also stored in the registry. - */ - case LOCALE_ICOUNTRY: return L"iCountry"; - case LOCALE_IDATE: return L"iDate"; - case LOCALE_ILDATE: return L"iLDate"; - case LOCALE_ITLZERO: return L"iTLZero"; - case LOCALE_SCOUNTRY: return L"sCountry"; - case LOCALE_SLANGUAGE: return L"sLanguage"; - - /* The following are used in XP and later */ - case LOCALE_IDIGITSUBSTITUTION: return L"NumShape"; - case LOCALE_SNATIVEDIGITS: return L"sNativeDigits"; - case LOCALE_ITIMEMARKPOSN: return L"iTimePrefix"; - } - return NULL; -} - -HKEY RosCreateRegistryKey(void) -{ - OBJECT_ATTRIBUTES objAttr; - UNICODE_STRING nameW; - HANDLE hKey; - - if (RtlOpenCurrentUser( KEY_ALL_ACCESS, &hKey ) != STATUS_SUCCESS) return 0; - - objAttr.Length = sizeof(objAttr); - objAttr.RootDirectory = hKey; - objAttr.ObjectName = &nameW; - objAttr.Attributes = 0; - objAttr.SecurityDescriptor = NULL; - objAttr.SecurityQualityOfService = NULL; - RtlInitUnicodeString( &nameW, L"Control Panel\\International"); - - if (NtCreateKey( &hKey, KEY_ALL_ACCESS, &objAttr, 0, NULL, 0, NULL ) != STATUS_SUCCESS) hKey = 0; - NtClose( objAttr.RootDirectory ); - return hKey; -} - -INT RosGetRegistryLocaleInfo( LPCWSTR lpValue, LPWSTR lpBuffer, INT nLen ) -{ - DWORD dwSize; - HKEY hKey; - INT nRet; - NTSTATUS ntStatus; - UNICODE_STRING usNameW; - KEY_VALUE_PARTIAL_INFORMATION *kvpiInfo; - const int nInfoSize = FIELD_OFFSET(KEY_VALUE_PARTIAL_INFORMATION, Data); - - if (!(hKey = RosCreateRegistryKey())) return -1; - - RtlInitUnicodeString( &usNameW, lpValue ); - dwSize = nInfoSize + nLen * sizeof(WCHAR); - - if (!(kvpiInfo = HeapAlloc( GetProcessHeap(), 0, dwSize ))) - { - NtClose( hKey ); - SetLastError( ERROR_NOT_ENOUGH_MEMORY ); - return 0; - } - - ntStatus = NtQueryValueKey( hKey, &usNameW, KeyValuePartialInformation, kvpiInfo, dwSize, &dwSize ); - - if (!ntStatus) - { - nRet = (dwSize - nInfoSize) / sizeof(WCHAR); - - if (!nRet || ((WCHAR *)kvpiInfo->Data)[nRet - 1]) - { - if (nRet < nLen || !lpBuffer) nRet++; - else - { - SetLastError( ERROR_INSUFFICIENT_BUFFER ); - nRet = 0; - } - } - if (nRet && lpBuffer) - { - memcpy( lpBuffer, kvpiInfo->Data, (nRet - 1) * sizeof(WCHAR) ); - lpBuffer[nRet - 1] = 0; - } - } - else if (ntStatus == STATUS_BUFFER_OVERFLOW && !lpBuffer) - { - nRet = (dwSize - nInfoSize) / sizeof(WCHAR) + 1; - } - else if (ntStatus == STATUS_OBJECT_NAME_NOT_FOUND) - { - nRet = -1; - } - else - { - SetLastError( RtlNtStatusToDosError(ntStatus) ); - nRet = 0; - } - NtClose( hKey ); - HeapFree( GetProcessHeap(), 0, kvpiInfo ); - return nRet; -} - -int -WINAPI -GetLocaleInfoEx ( - LPCWSTR lpLocaleName, - LCTYPE LCType, - LPWSTR lpLCData, - int cchData - ) -{ - return -1; -} - -/* - * @implemented - */ -int -WINAPI -GetLocaleInfoW ( - LCID Locale, - LCTYPE LCType, - LPWSTR lpLCData, - int cchData - ) -{ - LANGID liLangID; - HRSRC hRsrc; - HGLOBAL hMem; - HMODULE hModule; - INT nRet; - UINT uiFlags; - const WCHAR *ch; - int i; - - if (cchData < 0 || (cchData && !lpLCData)) - { - SetLastError( ERROR_INVALID_PARAMETER ); - return 0; - } - if (LCType & LOCALE_RETURN_GENITIVE_NAMES && - !is_genitive_name_supported( LCType )) - { - SetLastError( ERROR_INVALID_FLAGS ); - return 0; - } - - if (!cchData) lpLCData = NULL; - - if (Locale == LOCALE_NEUTRAL || Locale == LOCALE_SYSTEM_DEFAULT) Locale = GetSystemDefaultLCID(); - else if (Locale == LOCALE_USER_DEFAULT) Locale = GetUserDefaultLCID(); - - uiFlags = LCType & LOCALE_LOCALEINFOFLAGSMASK; - LCType &= ~LOCALE_LOCALEINFOFLAGSMASK; - - if (!(uiFlags & LOCALE_NOUSEROVERRIDE) && Locale == GetUserDefaultLCID()) - { - const WCHAR *value = RosGetLocaleValueName(LCType); - - if (value && ((nRet = RosGetRegistryLocaleInfo( value, lpLCData, cchData )) != -1)) return nRet; - } - - liLangID = LANGIDFROMLCID( Locale ); - - if (SUBLANGID(liLangID) == SUBLANG_NEUTRAL) - liLangID = MAKELANGID(PRIMARYLANGID(liLangID), SUBLANG_DEFAULT); - - hModule = GetModuleHandleW( L"kernel32.dll" ); - if (!(hRsrc = FindResourceExW( hModule, (LPWSTR)RT_STRING, (LPCWSTR)((LCType >> 4) + 1), liLangID ))) - { - SetLastError( ERROR_INVALID_FLAGS ); - return 0; - } - if (!(hMem = LoadResource( hModule, hRsrc ))) - return 0; - - ch = LockResource( hMem ); - for (i = 0; i < (LCType & 0x0f); i++) ch += *ch + 1; - - if (uiFlags & LOCALE_RETURN_NUMBER) nRet = sizeof(UINT) / sizeof(WCHAR); - else if (is_genitive_name_supported( LCType ) && *ch) - { - /* genitive form's stored after a null separator from a nominative */ - for (i = 1; i <= *ch; i++) if (!ch[i]) break; - - if (i <= *ch && (uiFlags & LOCALE_RETURN_GENITIVE_NAMES)) - { - nRet = *ch - i + 1; - ch += i; - } - else nRet = i; - } - else - nRet = (LCType == LOCALE_FONTSIGNATURE) ? *ch : *ch + 1; - - if (!lpLCData) return nRet; - - if (nRet > cchData) - { - SetLastError( ERROR_INSUFFICIENT_BUFFER ); - return 0; - } - - if (uiFlags & LOCALE_RETURN_NUMBER) - { - UINT uiNum; - WCHAR *chEnd, *chTmp = HeapAlloc( GetProcessHeap(), 0, (*ch + 1) * sizeof(WCHAR) ); - - if (!chTmp) - return 0; - - memcpy( chTmp, ch + 1, *ch * sizeof(WCHAR) ); - chTmp[*ch] = L'\0'; - uiNum = wcstol( chTmp, &chEnd, 10 ); - - if (!*chEnd) - memcpy( lpLCData, &uiNum, sizeof(uiNum) ); - else - { - SetLastError( ERROR_INVALID_FLAGS ); - nRet = 0; - } - HeapFree( GetProcessHeap(), 0, chTmp ); - } - else - { - memcpy( lpLCData, ch + 1, nRet * sizeof(WCHAR) ); - if (LCType != LOCALE_FONTSIGNATURE) lpLCData[nRet-1] = 0; - } - return nRet; -} - - - /*********************************************************************** - * get_lcid_codepage + * VerLanguageNameW (KERNEL32.@) * - * Retrieve the ANSI codepage for a given locale. + * See VerLanguageNameA. */ -__inline static UINT get_lcid_codepage( LCID lcid ) +DWORD WINAPI VerLanguageNameW( DWORD wLang, LPWSTR szLang, DWORD nSize ) { - UINT ret; - if (!GetLocaleInfoW( lcid, LOCALE_IDEFAULTANSICODEPAGE|LOCALE_RETURN_NUMBER, (WCHAR *)&ret, - sizeof(ret)/sizeof(WCHAR) )) ret = 0; + return GetLocaleInfoW( MAKELCID(wLang, SORT_DEFAULT), LOCALE_SENGLANGUAGE, szLang, nSize ); +} + +/****************************************************************************** + * GetStringTypeW (KERNEL32.@) + * + * See GetStringTypeA. + */ +BOOL WINAPI GetStringTypeW( DWORD type, LPCWSTR src, INT count, LPWORD chartype ) +{ + static const unsigned char type2_map[16] = + { + C2_NOTAPPLICABLE, /* unassigned */ + C2_LEFTTORIGHT, /* L */ + C2_RIGHTTOLEFT, /* R */ + C2_EUROPENUMBER, /* EN */ + C2_EUROPESEPARATOR, /* ES */ + C2_EUROPETERMINATOR, /* ET */ + C2_ARABICNUMBER, /* AN */ + C2_COMMONSEPARATOR, /* CS */ + C2_BLOCKSEPARATOR, /* B */ + C2_SEGMENTSEPARATOR, /* S */ + C2_WHITESPACE, /* WS */ + C2_OTHERNEUTRAL, /* ON */ + C2_RIGHTTOLEFT, /* AL */ + C2_NOTAPPLICABLE, /* NSM */ + C2_NOTAPPLICABLE, /* BN */ + C2_OTHERNEUTRAL /* LRE, LRO, RLE, RLO, PDF */ + }; + + if (count == -1) count = strlenW(src) + 1; + switch(type) + { + case CT_CTYPE1: + while (count--) *chartype++ = get_char_typeW( *src++ ) & 0xfff; + break; + case CT_CTYPE2: + while (count--) *chartype++ = type2_map[get_char_typeW( *src++ ) >> 12]; + break; + case CT_CTYPE3: + { + WARN("CT_CTYPE3: semi-stub.\n"); + while (count--) + { + int c = *src; + WORD type1, type3 = 0; /* C3_NOTAPPLICABLE */ + + type1 = get_char_typeW( *src++ ) & 0xfff; + /* try to construct type3 from type1 */ + if(type1 & C1_SPACE) type3 |= C3_SYMBOL; + if(type1 & C1_ALPHA) type3 |= C3_ALPHA; + if ((c>=0x30A0)&&(c<=0x30FF)) type3 |= C3_KATAKANA; + if ((c>=0x3040)&&(c<=0x309F)) type3 |= C3_HIRAGANA; + if ((c>=0x4E00)&&(c<=0x9FAF)) type3 |= C3_IDEOGRAPH; + if ((c>=0x0600)&&(c<=0x06FF)) type3 |= C3_KASHIDA; + if ((c>=0x3000)&&(c<=0x303F)) type3 |= C3_SYMBOL; + + if ((c>=0xFF00)&&(c<=0xFF60)) type3 |= C3_FULLWIDTH; + if ((c>=0xFF00)&&(c<=0xFF20)) type3 |= C3_SYMBOL; + if ((c>=0xFF3B)&&(c<=0xFF40)) type3 |= C3_SYMBOL; + if ((c>=0xFF5B)&&(c<=0xFF60)) type3 |= C3_SYMBOL; + if ((c>=0xFF21)&&(c<=0xFF3A)) type3 |= C3_ALPHA; + if ((c>=0xFF41)&&(c<=0xFF5A)) type3 |= C3_ALPHA; + if ((c>=0xFFE0)&&(c<=0xFFE6)) type3 |= C3_FULLWIDTH; + if ((c>=0xFFE0)&&(c<=0xFFE6)) type3 |= C3_SYMBOL; + + if ((c>=0xFF61)&&(c<=0xFFDC)) type3 |= C3_HALFWIDTH; + if ((c>=0xFF61)&&(c<=0xFF64)) type3 |= C3_SYMBOL; + if ((c>=0xFF65)&&(c<=0xFF9F)) type3 |= C3_KATAKANA; + if ((c>=0xFF65)&&(c<=0xFF9F)) type3 |= C3_ALPHA; + if ((c>=0xFFE8)&&(c<=0xFFEE)) type3 |= C3_HALFWIDTH; + if ((c>=0xFFE8)&&(c<=0xFFEE)) type3 |= C3_SYMBOL; + *chartype++ = type3; + } + break; + } + default: + SetLastError( ERROR_INVALID_PARAMETER ); + return FALSE; + } + return TRUE; +} + + +/****************************************************************************** + * GetStringTypeExW (KERNEL32.@) + * + * See GetStringTypeExA. + */ +BOOL WINAPI GetStringTypeExW( LCID locale, DWORD type, LPCWSTR src, INT count, LPWORD chartype ) +{ + /* locale is ignored for Unicode */ + return GetStringTypeW( type, src, count, chartype ); +} + + +/****************************************************************************** + * GetStringTypeA (KERNEL32.@) + * + * Get characteristics of the characters making up a string. + * + * PARAMS + * locale [I] Locale Id for the string + * type [I] CT_CTYPE1 = classification, CT_CTYPE2 = directionality, CT_CTYPE3 = typographic info + * src [I] String to analyse + * count [I] Length of src in chars, or -1 if src is NUL terminated + * chartype [O] Destination for the calculated characteristics + * + * RETURNS + * Success: TRUE. chartype is filled with the requested characteristics of each char + * in src. + * Failure: FALSE. Use GetLastError() to determine the cause. + */ +BOOL WINAPI GetStringTypeA( LCID locale, DWORD type, LPCSTR src, INT count, LPWORD chartype ) +{ + UINT cp; + INT countW; + LPWSTR srcW; + BOOL ret = FALSE; + + if(count == -1) count = strlen(src) + 1; + + if (!(cp = get_lcid_codepage( locale ))) + { + FIXME("For locale %04x using current ANSI code page\n", locale); + cp = GetACP(); + } + + countW = MultiByteToWideChar(cp, 0, src, count, NULL, 0); + if((srcW = HeapAlloc(GetProcessHeap(), 0, countW * sizeof(WCHAR)))) + { + MultiByteToWideChar(cp, 0, src, count, srcW, countW); + /* + * NOTE: the target buffer has 1 word for each CHARACTER in the source + * string, with multibyte characters there maybe be more bytes in count + * than character space in the buffer! + */ + ret = GetStringTypeW(type, srcW, countW, chartype); + HeapFree(GetProcessHeap(), 0, srcW); + } return ret; } +/****************************************************************************** + * GetStringTypeExA (KERNEL32.@) + * + * Get characteristics of the characters making up a string. + * + * PARAMS + * locale [I] Locale Id for the string + * type [I] CT_CTYPE1 = classification, CT_CTYPE2 = directionality, CT_CTYPE3 = typographic info + * src [I] String to analyse + * count [I] Length of src in chars, or -1 if src is NUL terminated + * chartype [O] Destination for the calculated characteristics + * + * RETURNS + * Success: TRUE. chartype is filled with the requested characteristics of each char + * in src. + * Failure: FALSE. Use GetLastError() to determine the cause. + */ +BOOL WINAPI GetStringTypeExA( LCID locale, DWORD type, LPCSTR src, INT count, LPWORD chartype ) +{ + return GetStringTypeA(locale, type, src, count, chartype); +} + + +/************************************************************************* + * LCMapStringW (KERNEL32.@) + * + * See LCMapStringA. + */ +INT WINAPI LCMapStringW(LCID lcid, DWORD flags, LPCWSTR src, INT srclen, + LPWSTR dst, INT dstlen) +{ + LPWSTR dst_ptr; + + if (!src || !srclen || dstlen < 0) + { + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } + + /* mutually exclusive flags */ + if ((flags & (LCMAP_LOWERCASE | LCMAP_UPPERCASE)) == (LCMAP_LOWERCASE | LCMAP_UPPERCASE) || + (flags & (LCMAP_HIRAGANA | LCMAP_KATAKANA)) == (LCMAP_HIRAGANA | LCMAP_KATAKANA) || + (flags & (LCMAP_HALFWIDTH | LCMAP_FULLWIDTH)) == (LCMAP_HALFWIDTH | LCMAP_FULLWIDTH) || + (flags & (LCMAP_TRADITIONAL_CHINESE | LCMAP_SIMPLIFIED_CHINESE)) == (LCMAP_TRADITIONAL_CHINESE | LCMAP_SIMPLIFIED_CHINESE)) + { + SetLastError(ERROR_INVALID_FLAGS); + return 0; + } + + if (!dstlen) dst = NULL; + + lcid = ConvertDefaultLocale(lcid); + + if (flags & LCMAP_SORTKEY) + { + INT ret; + if (src == dst) + { + SetLastError(ERROR_INVALID_FLAGS); + return 0; + } + + if (srclen < 0) srclen = strlenW(src); + + TRACE("(0x%04x,0x%08x,%s,%d,%p,%d)\n", + lcid, flags, debugstr_wn(src, srclen), srclen, dst, dstlen); + + ret = wine_get_sortkey(flags, src, srclen, (char *)dst, dstlen); + if (ret == 0) + SetLastError(ERROR_INSUFFICIENT_BUFFER); + else + ret++; + return ret; + } + + /* SORT_STRINGSORT must be used exclusively with LCMAP_SORTKEY */ + if (flags & SORT_STRINGSORT) + { + SetLastError(ERROR_INVALID_FLAGS); + return 0; + } + + if (srclen < 0) srclen = strlenW(src) + 1; + + TRACE("(0x%04x,0x%08x,%s,%d,%p,%d)\n", + lcid, flags, debugstr_wn(src, srclen), srclen, dst, dstlen); + + if (!dst) /* return required string length */ + { + INT len; + + for (len = 0; srclen; src++, srclen--) + { + WCHAR wch = *src; + /* tests show that win2k just ignores NORM_IGNORENONSPACE, + * and skips white space and punctuation characters for + * NORM_IGNORESYMBOLS. + */ + if ((flags & NORM_IGNORESYMBOLS) && (get_char_typeW(wch) & (C1_PUNCT | C1_SPACE))) + continue; + len++; + } + return len; + } + + if (flags & LCMAP_UPPERCASE) + { + for (dst_ptr = dst; srclen && dstlen; src++, srclen--) + { + WCHAR wch = *src; + if ((flags & NORM_IGNORESYMBOLS) && (get_char_typeW(wch) & (C1_PUNCT | C1_SPACE))) + continue; + *dst_ptr++ = toupperW(wch); + dstlen--; + } + } + else if (flags & LCMAP_LOWERCASE) + { + for (dst_ptr = dst; srclen && dstlen; src++, srclen--) + { + WCHAR wch = *src; + if ((flags & NORM_IGNORESYMBOLS) && (get_char_typeW(wch) & (C1_PUNCT | C1_SPACE))) + continue; + *dst_ptr++ = tolowerW(wch); + dstlen--; + } + } + else + { + if (src == dst) + { + SetLastError(ERROR_INVALID_FLAGS); + return 0; + } + for (dst_ptr = dst; srclen && dstlen; src++, srclen--) + { + WCHAR wch = *src; + if ((flags & NORM_IGNORESYMBOLS) && (get_char_typeW(wch) & (C1_PUNCT | C1_SPACE))) + continue; + *dst_ptr++ = wch; + dstlen--; + } + } + + if (srclen) + { + SetLastError(ERROR_INSUFFICIENT_BUFFER); + return 0; + } + + return dst_ptr - dst; +} + +/************************************************************************* + * LCMapStringA (KERNEL32.@) + * + * Map characters in a locale sensitive string. + * + * PARAMS + * lcid [I] LCID for the conversion. + * flags [I] Flags controlling the mapping (LCMAP_ constants from "winnls.h"). + * src [I] String to map + * srclen [I] Length of src in chars, or -1 if src is NUL terminated + * dst [O] Destination for mapped string + * dstlen [I] Length of dst in characters + * + * RETURNS + * Success: The length of the mapped string in dst, including the NUL terminator. + * Failure: 0. Use GetLastError() to determine the cause. + */ +INT WINAPI LCMapStringA(LCID lcid, DWORD flags, LPCSTR src, INT srclen, + LPSTR dst, INT dstlen) +{ + WCHAR *bufW = NtCurrentTeb()->StaticUnicodeBuffer; + LPWSTR srcW, dstW; + INT ret = 0, srclenW, dstlenW; + UINT locale_cp = CP_ACP; + + if (!src || !srclen || dstlen < 0) + { + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } + + if (!(flags & LOCALE_USE_CP_ACP)) locale_cp = get_lcid_codepage( lcid ); + + srclenW = MultiByteToWideChar(locale_cp, 0, src, srclen, bufW, 260); + if (srclenW) + srcW = bufW; + else + { + srclenW = MultiByteToWideChar(locale_cp, 0, src, srclen, NULL, 0); + srcW = HeapAlloc(GetProcessHeap(), 0, srclenW * sizeof(WCHAR)); + if (!srcW) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return 0; + } + MultiByteToWideChar(locale_cp, 0, src, srclen, srcW, srclenW); + } + + if (flags & LCMAP_SORTKEY) + { + if (src == dst) + { + SetLastError(ERROR_INVALID_FLAGS); + goto map_string_exit; + } + ret = wine_get_sortkey(flags, srcW, srclenW, dst, dstlen); + if (ret == 0) + SetLastError(ERROR_INSUFFICIENT_BUFFER); + else + ret++; + goto map_string_exit; + } + + if (flags & SORT_STRINGSORT) + { + SetLastError(ERROR_INVALID_FLAGS); + goto map_string_exit; + } + + dstlenW = LCMapStringW(lcid, flags, srcW, srclenW, NULL, 0); + if (!dstlenW) + goto map_string_exit; + + dstW = HeapAlloc(GetProcessHeap(), 0, dstlenW * sizeof(WCHAR)); + if (!dstW) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + goto map_string_exit; + } + + LCMapStringW(lcid, flags, srcW, srclenW, dstW, dstlenW); + ret = WideCharToMultiByte(locale_cp, 0, dstW, dstlenW, dst, dstlen, NULL, NULL); + HeapFree(GetProcessHeap(), 0, dstW); + +map_string_exit: + if (srcW != bufW) HeapFree(GetProcessHeap(), 0, srcW); + return ret; +} /************************************************************************* * FoldStringA (KERNEL32.@) @@ -1889,20 +1735,63 @@ INT WINAPI FoldStringW(DWORD dwFlags, LPCWSTR src, INT srclen, return ret; } - -/* - * @implemented (Synced to Wine-22112008) +/****************************************************************************** + * CompareStringW (KERNEL32.@) + * + * See CompareStringA. */ -int -WINAPI -CompareStringA ( - LCID Locale, - DWORD dwCmpFlags, - LPCSTR lpString1, - int cchCount1, - LPCSTR lpString2, - int cchCount2 - ) +INT WINAPI CompareStringW(LCID lcid, DWORD style, + LPCWSTR str1, INT len1, LPCWSTR str2, INT len2) +{ + INT ret; + + if (!str1 || !str2) + { + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } + + if( style & ~(NORM_IGNORECASE|NORM_IGNORENONSPACE|NORM_IGNORESYMBOLS| + SORT_STRINGSORT|NORM_IGNOREKANATYPE|NORM_IGNOREWIDTH|LOCALE_USE_CP_ACP|0x10000000) ) + { + SetLastError(ERROR_INVALID_FLAGS); + return 0; + } + + /* this style is related to diacritics in Arabic, Japanese, and Hebrew */ + if (style & 0x10000000) + WARN("Ignoring unknown style 0x10000000\n"); + + if (len1 < 0) len1 = strlenW(str1); + if (len2 < 0) len2 = strlenW(str2); + + ret = wine_compare_string(style, str1, len1, str2, len2); + + if (ret) /* need to translate result */ + return (ret < 0) ? CSTR_LESS_THAN : CSTR_GREATER_THAN; + return CSTR_EQUAL; +} + +/****************************************************************************** + * CompareStringA (KERNEL32.@) + * + * Compare two locale sensitive strings. + * + * PARAMS + * lcid [I] LCID for the comparison + * style [I] Flags for the comparison (NORM_ constants from "winnls.h"). + * str1 [I] First string to compare + * len1 [I] Length of str1, or -1 if str1 is NUL terminated + * str2 [I] Second string to compare + * len2 [I] Length of str2, or -1 if str2 is NUL terminated + * + * RETURNS + * Success: CSTR_LESS_THAN, CSTR_EQUAL or CSTR_GREATER_THAN depending on whether + * str1 is less than, equal to or greater than str2 respectively. + * Failure: FALSE. Use GetLastError() to determine the cause. + */ +INT WINAPI CompareStringA(LCID lcid, DWORD style, + LPCSTR str1, INT len1, LPCSTR str2, INT len2) { WCHAR *buf1W = NtCurrentTeb()->StaticUnicodeBuffer; WCHAR *buf2W = buf1W + 130; @@ -1910,36 +1799,36 @@ CompareStringA ( INT len1W, len2W, ret; UINT locale_cp = CP_ACP; - if (!lpString1 || !lpString2) + if (!str1 || !str2) { SetLastError(ERROR_INVALID_PARAMETER); return 0; } - if (cchCount1 < 0) cchCount1 = strlen(lpString1); - if (cchCount2 < 0) cchCount2 = strlen(lpString2); + if (len1 < 0) len1 = strlen(str1); + if (len2 < 0) len2 = strlen(str2); - if (!(dwCmpFlags & LOCALE_USE_CP_ACP)) locale_cp = get_lcid_codepage(Locale); + if (!(style & LOCALE_USE_CP_ACP)) locale_cp = get_lcid_codepage( lcid ); - len1W = MultiByteToWideChar(locale_cp, 0, lpString1, cchCount1, buf1W, 130); + len1W = MultiByteToWideChar(locale_cp, 0, str1, len1, buf1W, 130); if (len1W) str1W = buf1W; else { - len1W = MultiByteToWideChar(locale_cp, 0, lpString1, cchCount1, NULL, 0); + len1W = MultiByteToWideChar(locale_cp, 0, str1, len1, NULL, 0); str1W = HeapAlloc(GetProcessHeap(), 0, len1W * sizeof(WCHAR)); if (!str1W) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); return 0; } - MultiByteToWideChar(locale_cp, 0, lpString1, cchCount1, str1W, len1W); + MultiByteToWideChar(locale_cp, 0, str1, len1, str1W, len1W); } - len2W = MultiByteToWideChar(locale_cp, 0, lpString2, cchCount2, buf2W, 130); + len2W = MultiByteToWideChar(locale_cp, 0, str2, len2, buf2W, 130); if (len2W) str2W = buf2W; else { - len2W = MultiByteToWideChar(locale_cp, 0, lpString2, cchCount2, NULL, 0); + len2W = MultiByteToWideChar(locale_cp, 0, str2, len2, NULL, 0); str2W = HeapAlloc(GetProcessHeap(), 0, len2W * sizeof(WCHAR)); if (!str2W) { @@ -1947,250 +1836,701 @@ CompareStringA ( SetLastError(ERROR_NOT_ENOUGH_MEMORY); return 0; } - MultiByteToWideChar(locale_cp, 0, lpString2, cchCount2, str2W, len2W); + MultiByteToWideChar(locale_cp, 0, str2, len2, str2W, len2W); } - ret = CompareStringW(Locale, dwCmpFlags, str1W, len1W, str2W, len2W); + ret = CompareStringW(lcid, style, str1W, len1W, str2W, len2W); if (str1W != buf1W) HeapFree(GetProcessHeap(), 0, str1W); if (str2W != buf2W) HeapFree(GetProcessHeap(), 0, str2W); return ret; } -/* - * @implemented (Synced to Wine-22/11/2008) - */ -int -WINAPI -CompareStringW ( - LCID Locale, - DWORD dwCmpFlags, - LPCWSTR lpString1, - int cchCount1, - LPCWSTR lpString2, - int cchCount2 - ) +static HANDLE NLS_RegOpenKey(HANDLE hRootKey, LPCWSTR szKeyName) { - INT Result; + UNICODE_STRING keyName; + OBJECT_ATTRIBUTES attr; + HANDLE hkey; - if (!lpString1 || !lpString2) - { - SetLastError(ERROR_INVALID_PARAMETER); - return 0; - } + RtlInitUnicodeString( &keyName, szKeyName ); + InitializeObjectAttributes(&attr, &keyName, 0, hRootKey, NULL); - if (dwCmpFlags & ~(NORM_IGNORECASE | NORM_IGNORENONSPACE | - NORM_IGNORESYMBOLS | SORT_STRINGSORT | NORM_IGNOREKANATYPE | - NORM_IGNOREWIDTH | LOCALE_USE_CP_ACP | 0x10000000)) - { - SetLastError(ERROR_INVALID_FLAGS); - return 0; - } + if (NtOpenKey( &hkey, KEY_READ, &attr ) != STATUS_SUCCESS) + hkey = 0; - /* this style is related to diacritics in Arabic, Japanese, and Hebrew */ - if (dwCmpFlags & 0x10000000) - DPRINT1("Ignoring unknown style 0x10000000\n"); - - if (cchCount1 < 0) cchCount1 = wcslen(lpString1); - if (cchCount2 < 0) cchCount2 = wcslen(lpString2); - - Result = wine_compare_string(dwCmpFlags, lpString1, cchCount1, lpString2, cchCount2); - - if (Result) /* need to translate result */ - return (Result < 0) ? CSTR_LESS_THAN : CSTR_GREATER_THAN; - - return CSTR_EQUAL; + return hkey; } - - - -/* - * @implemented - * - * Get information about an aspect of a locale. - * - * PARAMS - * lcid [I] LCID of the locale - * lctype [I] LCTYPE_ flags from "winnls.h" - * buffer [O] Destination for the information - * len [I] Length of buffer in characters - * - * RETURNS - * Success: The size of the data requested. If buffer is non-NULL, it is filled - * with the information. - * Failure: 0. Use GetLastError() to determine the cause. - * - * NOTES - * - LOCALE_NEUTRAL is equal to LOCALE_SYSTEM_DEFAULT - * - The string returned is NUL terminated, except for LOCALE_FONTSIGNATURE, - * which is a bit string. - */ -INT WINAPI GetLocaleInfoA( LCID lcid, LCTYPE lctype, LPSTR buffer, INT len ) +static BOOL NLS_RegEnumSubKey(HANDLE hKey, UINT ulIndex, LPWSTR szKeyName, + ULONG keyNameSize) { - WCHAR *bufferW; - INT lenW, ret; + BYTE buffer[80]; + KEY_BASIC_INFORMATION *info = (KEY_BASIC_INFORMATION *)buffer; + DWORD dwLen; - if (len < 0 || (len && !buffer)) + if (NtEnumerateKey( hKey, ulIndex, KeyBasicInformation, buffer, + sizeof(buffer), &dwLen) != STATUS_SUCCESS || + info->NameLength > keyNameSize) { - SetLastError( ERROR_INVALID_PARAMETER ); - return 0; - } - if (lctype & LOCALE_RETURN_GENITIVE_NAMES ) - { - SetLastError( ERROR_INVALID_FLAGS ); - return 0; + return FALSE; } - if (!len) buffer = NULL; + TRACE("info->Name %s info->NameLength %d\n", debugstr_w(info->Name), info->NameLength); - if (!(lenW = GetLocaleInfoW( lcid, lctype, NULL, 0 ))) return 0; + memcpy( szKeyName, info->Name, info->NameLength); + szKeyName[info->NameLength / sizeof(WCHAR)] = '\0'; - if (!(bufferW = HeapAlloc( GetProcessHeap(), 0, lenW * sizeof(WCHAR) ))) + TRACE("returning %s\n", debugstr_w(szKeyName)); + return TRUE; +} + +static BOOL NLS_RegEnumValue(HANDLE hKey, UINT ulIndex, + LPWSTR szValueName, ULONG valueNameSize, + LPWSTR szValueData, ULONG valueDataSize) +{ + BYTE buffer[80]; + KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)buffer; + DWORD dwLen; + + if (NtEnumerateValueKey( hKey, ulIndex, KeyValueFullInformation, + buffer, sizeof(buffer), &dwLen ) != STATUS_SUCCESS || + info->NameLength > valueNameSize || + info->DataLength > valueDataSize) { - SetLastError( ERROR_NOT_ENOUGH_MEMORY ); - return 0; + return FALSE; } - if ((ret = GetLocaleInfoW( lcid, lctype, bufferW, lenW ))) + + TRACE("info->Name %s info->DataLength %d\n", debugstr_w(info->Name), info->DataLength); + + memcpy( szValueName, info->Name, info->NameLength); + szValueName[info->NameLength / sizeof(WCHAR)] = '\0'; + memcpy( szValueData, buffer + info->DataOffset, info->DataLength ); + szValueData[info->DataLength / sizeof(WCHAR)] = '\0'; + + TRACE("returning %s %s\n", debugstr_w(szValueName), debugstr_w(szValueData)); + return TRUE; +} + +static BOOL NLS_RegGetDword(HANDLE hKey, LPCWSTR szValueName, DWORD *lpVal) +{ + BYTE buffer[128]; + const KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer; + DWORD dwSize = sizeof(buffer); + UNICODE_STRING valueName; + + RtlInitUnicodeString( &valueName, szValueName ); + + TRACE("%p, %s\n", hKey, debugstr_w(szValueName)); + if (NtQueryValueKey( hKey, &valueName, KeyValuePartialInformation, + buffer, dwSize, &dwSize ) == STATUS_SUCCESS && + info->DataLength == sizeof(DWORD)) { - if ((lctype & LOCALE_RETURN_NUMBER) || - ((lctype & ~LOCALE_LOCALEINFOFLAGSMASK) == LOCALE_FONTSIGNATURE)) + memcpy(lpVal, info->Data, sizeof(DWORD)); + return TRUE; + } + + return FALSE; +} + +static BOOL NLS_GetLanguageGroupName(LGRPID lgrpid, LPWSTR szName, ULONG nameSize) +{ + LANGID langId; + LPCWSTR szResourceName = MAKEINTRESOURCEW(((lgrpid + 0x2000) >> 4) + 1); + HRSRC hResource; + BOOL bRet = FALSE; + + /* FIXME: Is it correct to use the system default langid? */ + langId = GetSystemDefaultLangID(); + + if (SUBLANGID(langId) == SUBLANG_NEUTRAL) + langId = MAKELANGID( PRIMARYLANGID(langId), SUBLANG_DEFAULT ); + + hResource = FindResourceExW( kernel32_handle, (LPWSTR)RT_STRING, szResourceName, langId ); + + if (hResource) + { + HGLOBAL hResDir = LoadResource( kernel32_handle, hResource ); + + if (hResDir) { - /* it's not an ASCII string, just bytes */ - ret *= sizeof(WCHAR); - if (buffer) + ULONG iResourceIndex = lgrpid & 0xf; + LPCWSTR lpResEntry = LockResource( hResDir ); + ULONG i; + + for (i = 0; i < iResourceIndex; i++) + lpResEntry += *lpResEntry + 1; + + if (*lpResEntry < nameSize) { - if (ret <= len) memcpy( buffer, bufferW, ret ); + memcpy( szName, lpResEntry + 1, *lpResEntry * sizeof(WCHAR) ); + szName[*lpResEntry] = '\0'; + bRet = TRUE; + } + + } + FreeResource( hResource ); + } + return bRet; +} + +/* Registry keys for NLS related information */ + +static const WCHAR szCountryListName[] = { + 'M','a','c','h','i','n','e','\\','S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\','W','i','n','d','o','w','s','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'T','e','l','e','p','h','o','n','y','\\', + 'C','o','u','n','t','r','y',' ','L','i','s','t','\0' +}; + + +/* Callback function ptrs for EnumSystemLanguageGroupsA/W */ +typedef struct +{ + LANGUAGEGROUP_ENUMPROCA procA; + LANGUAGEGROUP_ENUMPROCW procW; + DWORD dwFlags; + LONG_PTR lParam; +} ENUMLANGUAGEGROUP_CALLBACKS; + +/* Internal implementation of EnumSystemLanguageGroupsA/W */ +static BOOL NLS_EnumSystemLanguageGroups(ENUMLANGUAGEGROUP_CALLBACKS *lpProcs) +{ + WCHAR szNumber[10], szValue[4]; + HANDLE hKey; + BOOL bContinue = TRUE; + ULONG ulIndex = 0; + + if (!lpProcs) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + switch (lpProcs->dwFlags) + { + case 0: + /* Default to LGRPID_INSTALLED */ + lpProcs->dwFlags = LGRPID_INSTALLED; + /* Fall through... */ + case LGRPID_INSTALLED: + case LGRPID_SUPPORTED: + break; + default: + SetLastError(ERROR_INVALID_FLAGS); + return FALSE; + } + + hKey = NLS_RegOpenKey( 0, szLangGroupsKeyName ); + + if (!hKey) + FIXME("NLS registry key not found. Please apply the default registry file 'wine.inf'\n"); + + while (bContinue) + { + if (NLS_RegEnumValue( hKey, ulIndex, szNumber, sizeof(szNumber), + szValue, sizeof(szValue) )) + { + BOOL bInstalled = szValue[0] == '1' ? TRUE : FALSE; + LGRPID lgrpid = strtoulW( szNumber, NULL, 16 ); + + TRACE("grpid %s (%sinstalled)\n", debugstr_w(szNumber), + bInstalled ? "" : "not "); + + if (lpProcs->dwFlags == LGRPID_SUPPORTED || bInstalled) + { + WCHAR szGrpName[48]; + + if (!NLS_GetLanguageGroupName( lgrpid, szGrpName, sizeof(szGrpName) / sizeof(WCHAR) )) + szGrpName[0] = '\0'; + + if (lpProcs->procW) + bContinue = lpProcs->procW( lgrpid, szNumber, szGrpName, lpProcs->dwFlags, + lpProcs->lParam ); else { - SetLastError( ERROR_INSUFFICIENT_BUFFER ); - ret = 0; + char szNumberA[sizeof(szNumber)/sizeof(WCHAR)]; + char szGrpNameA[48]; + + /* FIXME: MSDN doesn't say which code page the W->A translation uses, + * or whether the language names are ever localised. Assume CP_ACP. + */ + + WideCharToMultiByte(CP_ACP, 0, szNumber, -1, szNumberA, sizeof(szNumberA), 0, 0); + WideCharToMultiByte(CP_ACP, 0, szGrpName, -1, szGrpNameA, sizeof(szGrpNameA), 0, 0); + + bContinue = lpProcs->procA( lgrpid, szNumberA, szGrpNameA, lpProcs->dwFlags, + lpProcs->lParam ); } } + + ulIndex++; + } + else + bContinue = FALSE; + + if (!bContinue) + break; + } + + if (hKey) + NtClose( hKey ); + + return TRUE; +} + +/****************************************************************************** + * EnumSystemLanguageGroupsA (KERNEL32.@) + * + * Call a users function for each language group available on the system. + * + * PARAMS + * pLangGrpEnumProc [I] Callback function to call for each language group + * dwFlags [I] LGRPID_SUPPORTED=All Supported, LGRPID_INSTALLED=Installed only + * lParam [I] User parameter to pass to pLangGrpEnumProc + * + * RETURNS + * Success: TRUE. + * Failure: FALSE. Use GetLastError() to determine the cause. + */ +BOOL WINAPI EnumSystemLanguageGroupsA(LANGUAGEGROUP_ENUMPROCA pLangGrpEnumProc, + DWORD dwFlags, LONG_PTR lParam) +{ + ENUMLANGUAGEGROUP_CALLBACKS procs; + + TRACE("(%p,0x%08X,0x%08lX)\n", pLangGrpEnumProc, dwFlags, lParam); + + procs.procA = pLangGrpEnumProc; + procs.procW = NULL; + procs.dwFlags = dwFlags; + procs.lParam = lParam; + + return NLS_EnumSystemLanguageGroups( pLangGrpEnumProc ? &procs : NULL); +} + +/****************************************************************************** + * EnumSystemLanguageGroupsW (KERNEL32.@) + * + * See EnumSystemLanguageGroupsA. + */ +BOOL WINAPI EnumSystemLanguageGroupsW(LANGUAGEGROUP_ENUMPROCW pLangGrpEnumProc, + DWORD dwFlags, LONG_PTR lParam) +{ + ENUMLANGUAGEGROUP_CALLBACKS procs; + + TRACE("(%p,0x%08X,0x%08lX)\n", pLangGrpEnumProc, dwFlags, lParam); + + procs.procA = NULL; + procs.procW = pLangGrpEnumProc; + procs.dwFlags = dwFlags; + procs.lParam = lParam; + + return NLS_EnumSystemLanguageGroups( pLangGrpEnumProc ? &procs : NULL); +} + +/****************************************************************************** + * IsValidLanguageGroup (KERNEL32.@) + * + * Determine if a language group is supported and/or installed. + * + * PARAMS + * lgrpid [I] Language Group Id (LGRPID_ values from "winnls.h") + * dwFlags [I] LGRPID_SUPPORTED=Supported, LGRPID_INSTALLED=Installed + * + * RETURNS + * TRUE, if lgrpid is supported and/or installed, according to dwFlags. + * FALSE otherwise. + */ +BOOL WINAPI IsValidLanguageGroup(LGRPID lgrpid, DWORD dwFlags) +{ + static const WCHAR szFormat[] = { '%','x','\0' }; + WCHAR szValueName[16], szValue[2]; + BOOL bSupported = FALSE, bInstalled = FALSE; + HANDLE hKey; + + + switch (dwFlags) + { + case LGRPID_INSTALLED: + case LGRPID_SUPPORTED: + + hKey = NLS_RegOpenKey( 0, szLangGroupsKeyName ); + + sprintfW( szValueName, szFormat, lgrpid ); + + if (NLS_RegGetDword( hKey, szValueName, (LPDWORD)szValue )) + { + bSupported = TRUE; + + if (szValue[0] == '1') + bInstalled = TRUE; + } + + if (hKey) + NtClose( hKey ); + + break; + } + + if ((dwFlags == LGRPID_SUPPORTED && bSupported) || + (dwFlags == LGRPID_INSTALLED && bInstalled)) + return TRUE; + + return FALSE; +} + +/* Callback function ptrs for EnumLanguageGrouplocalesA/W */ +typedef struct +{ + LANGGROUPLOCALE_ENUMPROCA procA; + LANGGROUPLOCALE_ENUMPROCW procW; + DWORD dwFlags; + LGRPID lgrpid; + LONG_PTR lParam; +} ENUMLANGUAGEGROUPLOCALE_CALLBACKS; + +/* Internal implementation of EnumLanguageGrouplocalesA/W */ +static BOOL NLS_EnumLanguageGroupLocales(ENUMLANGUAGEGROUPLOCALE_CALLBACKS *lpProcs) +{ + static const WCHAR szAlternateSortsKeyName[] = { + 'A','l','t','e','r','n','a','t','e',' ','S','o','r','t','s','\0' + }; + WCHAR szNumber[10], szValue[4]; + HANDLE hKey; + BOOL bContinue = TRUE, bAlternate = FALSE; + LGRPID lgrpid; + ULONG ulIndex = 1; /* Ignore default entry of 1st key */ + + if (!lpProcs || !lpProcs->lgrpid || lpProcs->lgrpid > LGRPID_ARMENIAN) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + if (lpProcs->dwFlags) + { + SetLastError(ERROR_INVALID_FLAGS); + return FALSE; + } + + hKey = NLS_RegOpenKey( 0, szLocaleKeyName ); + + if (!hKey) + WARN("NLS registry key not found. Please apply the default registry file 'wine.inf'\n"); + + while (bContinue) + { + if (NLS_RegEnumValue( hKey, ulIndex, szNumber, sizeof(szNumber), + szValue, sizeof(szValue) )) + { + lgrpid = strtoulW( szValue, NULL, 16 ); + + TRACE("lcid %s, grpid %d (%smatched)\n", debugstr_w(szNumber), + lgrpid, lgrpid == lpProcs->lgrpid ? "" : "not "); + + if (lgrpid == lpProcs->lgrpid) + { + LCID lcid; + + lcid = strtoulW( szNumber, NULL, 16 ); + + /* FIXME: native returns extra text for a few (17/150) locales, e.g: + * '00000437 ;Georgian' + * At present we only pass the LCID string. + */ + + if (lpProcs->procW) + bContinue = lpProcs->procW( lgrpid, lcid, szNumber, lpProcs->lParam ); + else + { + char szNumberA[sizeof(szNumber)/sizeof(WCHAR)]; + + WideCharToMultiByte(CP_ACP, 0, szNumber, -1, szNumberA, sizeof(szNumberA), 0, 0); + + bContinue = lpProcs->procA( lgrpid, lcid, szNumberA, lpProcs->lParam ); + } + } + + ulIndex++; } else { - UINT codepage = CP_ACP; - if (!(lctype & LOCALE_USE_CP_ACP)) codepage = get_lcid_codepage( lcid ); - ret = WideCharToMultiByte( codepage, 0, bufferW, ret, buffer, len, NULL, NULL ); + /* Finished enumerating this key */ + if (!bAlternate) + { + /* Enumerate alternate sorts also */ + hKey = NLS_RegOpenKey( hKey, szAlternateSortsKeyName ); + bAlternate = TRUE; + ulIndex = 0; + } + else + bContinue = FALSE; /* Finished both keys */ } + + if (!bContinue) + break; } - HeapFree( GetProcessHeap(), 0, bufferW ); - return ret; + + if (hKey) + NtClose( hKey ); + + return TRUE; } - -/* - * @implemented +/****************************************************************************** + * EnumLanguageGroupLocalesA (KERNEL32.@) + * + * Call a users function for every locale in a language group available on the system. + * + * PARAMS + * pLangGrpLcEnumProc [I] Callback function to call for each locale + * lgrpid [I] Language group (LGRPID_ values from "winnls.h") + * dwFlags [I] Reserved, set to 0 + * lParam [I] User parameter to pass to pLangGrpLcEnumProc + * + * RETURNS + * Success: TRUE. + * Failure: FALSE. Use GetLastError() to determine the cause. */ -LANGID WINAPI -GetSystemDefaultLangID(VOID) +BOOL WINAPI EnumLanguageGroupLocalesA(LANGGROUPLOCALE_ENUMPROCA pLangGrpLcEnumProc, + LGRPID lgrpid, DWORD dwFlags, LONG_PTR lParam) { - return LANGIDFROMLCID(GetSystemDefaultLCID()); + ENUMLANGUAGEGROUPLOCALE_CALLBACKS callbacks; + + TRACE("(%p,0x%08X,0x%08X,0x%08lX)\n", pLangGrpLcEnumProc, lgrpid, dwFlags, lParam); + + callbacks.procA = pLangGrpLcEnumProc; + callbacks.procW = NULL; + callbacks.dwFlags = dwFlags; + callbacks.lgrpid = lgrpid; + callbacks.lParam = lParam; + + return NLS_EnumLanguageGroupLocales( pLangGrpLcEnumProc ? &callbacks : NULL ); } - -/* - * @implemented +/****************************************************************************** + * EnumLanguageGroupLocalesW (KERNEL32.@) + * + * See EnumLanguageGroupLocalesA. */ -LCID WINAPI -GetSystemDefaultLCID(VOID) +BOOL WINAPI EnumLanguageGroupLocalesW(LANGGROUPLOCALE_ENUMPROCW pLangGrpLcEnumProc, + LGRPID lgrpid, DWORD dwFlags, LONG_PTR lParam) { - LCID lcid; + ENUMLANGUAGEGROUPLOCALE_CALLBACKS callbacks; - NtQueryDefaultLocale(FALSE, &lcid); + TRACE("(%p,0x%08X,0x%08X,0x%08lX)\n", pLangGrpLcEnumProc, lgrpid, dwFlags, lParam); - return lcid; + callbacks.procA = NULL; + callbacks.procW = pLangGrpLcEnumProc; + callbacks.dwFlags = dwFlags; + callbacks.lgrpid = lgrpid; + callbacks.lParam = lParam; + + return NLS_EnumLanguageGroupLocales( pLangGrpLcEnumProc ? &callbacks : NULL ); } - -/* - * @implemented - */ -LANGID WINAPI -GetSystemDefaultUILanguage(VOID) +/* Callback function ptrs for EnumSystemCodePagesA/W */ +typedef struct { - LANGID LanguageId; - NTSTATUS Status; + CODEPAGE_ENUMPROCA procA; + CODEPAGE_ENUMPROCW procW; + DWORD dwFlags; +} ENUMSYSTEMCODEPAGES_CALLBACKS; - Status = NtQueryInstallUILanguage(&LanguageId); - if (!NT_SUCCESS(Status)) +/* Internal implementation of EnumSystemCodePagesA/W */ +static BOOL NLS_EnumSystemCodePages(ENUMSYSTEMCODEPAGES_CALLBACKS *lpProcs) +{ + WCHAR szNumber[5 + 1], szValue[MAX_PATH]; + HANDLE hKey; + BOOL bContinue = TRUE; + ULONG ulIndex = 0; + + if (!lpProcs) { - SetLastErrorByStatus(Status); - return 0; + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; } - return LanguageId; -} - - -/* - * @implemented - */ -LCID WINAPI -GetThreadLocale(VOID) -{ - return NtCurrentTeb()->CurrentLocale; -} - - -/* - * @implemented - */ -LANGID WINAPI -GetUserDefaultLangID(VOID) -{ - return LANGIDFROMLCID(GetUserDefaultLCID()); -} - - -/* - * @implemented - */ -LCID WINAPI -GetUserDefaultLCID(VOID) -{ - LCID lcid; - NTSTATUS Status; - - Status = NtQueryDefaultLocale(TRUE, &lcid); - if (!NT_SUCCESS(Status)) + switch (lpProcs->dwFlags) { - SetLastErrorByStatus(Status); - return 0; + case CP_INSTALLED: + case CP_SUPPORTED: + break; + default: + SetLastError(ERROR_INVALID_FLAGS); + return FALSE; } - return lcid; -} + hKey = NLS_RegOpenKey(0, L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\NLS\\CodePage"); + if (!hKey) + { + WARN("NLS_RegOpenKey() failed\n"); + return FALSE; + } + while (bContinue) + { + if (NLS_RegEnumValue(hKey, ulIndex, szNumber, sizeof(szNumber), + szValue, sizeof(szValue))) + { + if ((lpProcs->dwFlags == CP_SUPPORTED)|| + ((lpProcs->dwFlags == CP_INSTALLED)&&(wcslen(szValue) > 2))) + { + if (lpProcs->procW) + { + bContinue = lpProcs->procW(szNumber); + } + else + { + char szNumberA[sizeof(szNumber)/sizeof(WCHAR)]; + + WideCharToMultiByte(CP_ACP, 0, szNumber, -1, szNumberA, sizeof(szNumberA), 0, 0); + bContinue = lpProcs->procA(szNumberA); + } + } + + ulIndex++; + + } else bContinue = FALSE; + + if (!bContinue) + break; + } + + if (hKey) + NtClose(hKey); + + return TRUE; +} /* * @implemented */ -LANGID WINAPI -GetUserDefaultUILanguage(VOID) -{ - LANGID LangId; - NTSTATUS Status; - - Status = NtQueryDefaultUILanguage(&LangId); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return 0; - } - - return LangId; -} - - -/* - * @unimplemented - */ -GEOID +BOOL WINAPI -GetUserGeoID( - GEOCLASS GeoClass) +EnumSystemCodePagesW ( + CODEPAGE_ENUMPROCW lpCodePageEnumProc, + DWORD dwFlags + ) +{ + ENUMSYSTEMCODEPAGES_CALLBACKS procs; + + TRACE("(%p,0x%08X,0x%08lX)\n", lpCodePageEnumProc, dwFlags); + + procs.procA = NULL; + procs.procW = lpCodePageEnumProc; + procs.dwFlags = dwFlags; + + return NLS_EnumSystemCodePages(lpCodePageEnumProc ? &procs : NULL); +} + + +/* + * @implemented + */ +BOOL +WINAPI +EnumSystemCodePagesA ( + CODEPAGE_ENUMPROCA lpCodePageEnumProc, + DWORD dwFlags + ) +{ + ENUMSYSTEMCODEPAGES_CALLBACKS procs; + + TRACE("(%p,0x%08X,0x%08lX)\n", lpCodePageEnumProc, dwFlags); + + procs.procA = lpCodePageEnumProc; + procs.procW = NULL; + procs.dwFlags = dwFlags; + + return NLS_EnumSystemCodePages(lpCodePageEnumProc ? &procs : NULL); +} +/****************************************************************************** + * EnumSystemGeoID (KERNEL32.@) + * + * Call a users function for every location available on the system. + * + * PARAMS + * geoclass [I] Type of information desired (SYSGEOTYPE enum from "winnls.h") + * reserved [I] Reserved, set to 0 + * pGeoEnumProc [I] Callback function to call for each location + * + * RETURNS + * Success: TRUE. + * Failure: FALSE. Use GetLastError() to determine the cause. + */ +BOOL WINAPI EnumSystemGeoID(GEOCLASS geoclass, GEOID reserved, GEO_ENUMPROC pGeoEnumProc) +{ + static const WCHAR szCountryCodeValueName[] = { + 'C','o','u','n','t','r','y','C','o','d','e','\0' + }; + WCHAR szNumber[10]; + HANDLE hKey; + ULONG ulIndex = 0; + + TRACE("(0x%08X,0x%08X,%p)\n", geoclass, reserved, pGeoEnumProc); + + if (geoclass != GEOCLASS_NATION || reserved || !pGeoEnumProc) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + hKey = NLS_RegOpenKey( 0, szCountryListName ); + + while (NLS_RegEnumSubKey( hKey, ulIndex, szNumber, sizeof(szNumber) )) + { + BOOL bContinue = TRUE; + DWORD dwGeoId; + HANDLE hSubKey = NLS_RegOpenKey( hKey, szNumber ); + + if (hSubKey) + { + if (NLS_RegGetDword( hSubKey, szCountryCodeValueName, &dwGeoId )) + { + TRACE("Got geoid %d\n", dwGeoId); + + if (!pGeoEnumProc( dwGeoId )) + bContinue = FALSE; + } + + NtClose( hSubKey ); + } + + if (!bContinue) + break; + + ulIndex++; + } + + if (hKey) + NtClose( hKey ); + + return TRUE; +} + +/****************************************************************************** + * InvalidateNLSCache (KERNEL32.@) + * + * Invalidate the cache of NLS values. + * + * PARAMS + * None. + * + * RETURNS + * Success: TRUE. + * Failure: FALSE. + */ +BOOL WINAPI InvalidateNLSCache(void) +{ + FIXME("() stub\n"); + return FALSE; +} + +/****************************************************************************** + * GetUserGeoID (KERNEL32.@) + */ +GEOID WINAPI GetUserGeoID( GEOCLASS GeoClass ) { GEOID ret = GEOID_NOT_AVAILABLE; static const WCHAR geoW[] = {'G','e','o',0}; @@ -2210,12 +2550,12 @@ GetUserGeoID( if ((hSubkey = NLS_RegOpenKey(hkey, geoW))) { if((NtQueryValueKey(hSubkey, &keyW, KeyValuePartialInformation, - (LPBYTE)bufferW, count, &count) == STATUS_SUCCESS ) && info->DataLength) - ret = wcstol((LPCWSTR)info->Data, &end, 10); + bufferW, count, &count) == STATUS_SUCCESS ) && info->DataLength) + ret = strtolW((LPCWSTR)info->Data, &end, 10); } break; case GEOCLASS_REGION: - DPRINT("GEOCLASS_REGION not handled yet\n"); + FIXME("GEOCLASS_REGION not handled yet\n"); break; } @@ -2224,702 +2564,10 @@ GetUserGeoID( return ret; } - /****************************************************************************** - * IsValidLanguageGroup - * - * Determine if a language group is supported and/or installed. - * - * PARAMS - * LanguageGroup [I] Language Group Id (LGRPID_ values from "winnls.h") - * dwFlags [I] LGRPID_SUPPORTED=Supported, LGRPID_INSTALLED=Installed - * - * RETURNS - * TRUE, if lgrpid is supported and/or installed, according to dwFlags. - * FALSE otherwise. - * - * @implemented + * SetUserGeoID (KERNEL32.@) */ -BOOL -WINAPI -IsValidLanguageGroup( - LGRPID LanguageGroup, - DWORD dwFlags) -{ - static const WCHAR szFormat[] = { '%','x','\0' }; - WCHAR szValueName[16], szValue[2]; - BOOL bSupported = FALSE, bInstalled = FALSE; - HANDLE hKey; - - - switch (dwFlags) - { - case LGRPID_INSTALLED: - case LGRPID_SUPPORTED: - - hKey = NLS_RegOpenKey( 0, szLangGroupsKeyName ); - if (!hKey) - break; - - swprintf( szValueName, szFormat, LanguageGroup ); - - if (NLS_RegGetDword( hKey, szValueName, (LPDWORD)szValue )) - { - bSupported = TRUE; - - if (szValue[0] == '1') - bInstalled = TRUE; - } - - NtClose( hKey ); - - break; - - default: - DPRINT("Invalid flags: %lx\n", dwFlags); - return FALSE; - } - - if ((dwFlags == LGRPID_SUPPORTED && bSupported) || - (dwFlags == LGRPID_INSTALLED && bInstalled)) - return TRUE; - - return FALSE; -} - - -/****************************************************************************** - * IsValidLocale - * - * Determine if a locale is valid. - * - * PARAMS - * Locale [I] LCID of the locale to check - * dwFlags [I] LCID_SUPPORTED = Valid - * LCID_INSTALLED = Valid and installed on the system - * - * RETURN - * TRUE, if Locale is valid, - * FALSE, otherwise. - * - * @implemented - */ -BOOL WINAPI -IsValidLocale(LCID Locale, - DWORD dwFlags) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - PKEY_VALUE_PARTIAL_INFORMATION KeyInfo; - WCHAR ValueNameBuffer[9]; - UNICODE_STRING KeyName; - UNICODE_STRING ValueName; - ULONG KeyInfoSize; - ULONG ReturnedSize; - HANDLE KeyHandle; - PWSTR ValueData; - NTSTATUS Status; - BOOL Installed = FALSE; - - DPRINT("IsValidLocale() called\n"); - - if ((dwFlags & ~(LCID_SUPPORTED | LCID_INSTALLED)) || - (dwFlags == (LCID_SUPPORTED | LCID_INSTALLED))) - { - DPRINT("Invalid flags: %lx\n", dwFlags); - return FALSE; - } - - if (Locale & 0xFFFF0000) - { - RtlInitUnicodeString(&KeyName, - L"\\REGISTRY\\Machine\\SYSTEM\\CurrentControlSet\\Control\\Nls\\Locale\\Alternate Sorts"); - } - else - { - RtlInitUnicodeString(&KeyName, - L"\\REGISTRY\\Machine\\SYSTEM\\CurrentControlSet\\Control\\Nls\\Locale"); - } - - InitializeObjectAttributes(&ObjectAttributes, - &KeyName, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - - Status = NtOpenKey(&KeyHandle, - KEY_QUERY_VALUE, - &ObjectAttributes); - if (!NT_SUCCESS(Status)) - { - DPRINT("NtOpenKey() failed (Status %lx)\n", Status); - SetLastError(ERROR_BADDB); - return FALSE; - } - - swprintf(ValueNameBuffer, L"%08lx", (ULONG)Locale); - RtlInitUnicodeString(&ValueName, ValueNameBuffer); - - KeyInfoSize = sizeof(KEY_VALUE_PARTIAL_INFORMATION) + 4 * sizeof(WCHAR); - KeyInfo = RtlAllocateHeap(RtlGetProcessHeap(), - HEAP_ZERO_MEMORY, - KeyInfoSize); - if (KeyInfo == NULL) - { - DPRINT("RtlAllocateHeap() failed (Status %lx)\n", Status); - NtClose(KeyHandle); - return FALSE; - } - - Status = NtQueryValueKey(KeyHandle, - &ValueName, - KeyValuePartialInformation, - KeyInfo, - KeyInfoSize, - &ReturnedSize); - NtClose(KeyHandle); - - if (!NT_SUCCESS(Status)) - { - DPRINT("NtQueryValueKey() failed (Status %lx)\n", Status); - RtlFreeHeap(RtlGetProcessHeap(), 0, KeyInfo); - return FALSE; - } - - if (dwFlags & LCID_SUPPORTED) - { - DPRINT("Locale is supported\n"); - RtlFreeHeap(RtlGetProcessHeap(), 0, KeyInfo); - return TRUE; - } - - ValueData = (PWSTR)&KeyInfo->Data[0]; - if ((KeyInfo->Type == REG_SZ) && - (KeyInfo->DataLength == 2 * sizeof(WCHAR))) - { - /* Find out if there is support for the language group - * installed, to which this language belongs */ - KeyHandle = NLS_RegOpenKey(0, szLangGroupsKeyName); - if (KeyHandle) - { - WCHAR Value[2]; - if (NLS_RegGetDword(KeyHandle, ValueData, (LPDWORD) Value) && - Value[0] == L'1') - { - Installed = TRUE; - DPRINT("Locale is supported and installed\n"); - } - - NtClose(KeyHandle); - } - } - - RtlFreeHeap(RtlGetProcessHeap(), 0, KeyInfo); - - DPRINT("IsValidLocale() called\n"); - - return Installed; -} - -/* - * @implemented - */ -int -WINAPI -LCMapStringA ( - LCID Locale, - DWORD dwMapFlags, - LPCSTR lpSrcStr, - int cchSrc, - LPSTR lpDestStr, - int cchDest - ) -{ - WCHAR *bufW = NtCurrentTeb()->StaticUnicodeBuffer; - LPWSTR srcW, dstW; - INT ret = 0, srclenW, dstlenW; - UINT locale_cp = CP_ACP; - - if (!lpSrcStr || !cchSrc || cchDest < 0) - { - SetLastError(ERROR_INVALID_PARAMETER); - return 0; - } - - if (!(dwMapFlags & LOCALE_USE_CP_ACP)) locale_cp = get_lcid_codepage(Locale); - - srclenW = MultiByteToWideChar(locale_cp, 0, lpSrcStr, cchSrc, bufW, 260); - if (srclenW) - srcW = bufW; - else - { - srclenW = MultiByteToWideChar(locale_cp, 0, lpSrcStr, cchSrc, NULL, 0); - srcW = HeapAlloc(GetProcessHeap(), 0, srclenW * sizeof(WCHAR)); - if (!srcW) - { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return 0; - } - MultiByteToWideChar(locale_cp, 0, lpSrcStr, cchSrc, srcW, srclenW); - } - - if (dwMapFlags & LCMAP_SORTKEY) - { - if (lpSrcStr == lpDestStr) - { - SetLastError(ERROR_INVALID_FLAGS); - goto map_string_exit; - } - ret = wine_get_sortkey(dwMapFlags, srcW, srclenW, lpDestStr, cchDest); - if (ret == 0) - SetLastError(ERROR_INSUFFICIENT_BUFFER); - else - ret++; - goto map_string_exit; - } - - if (dwMapFlags & SORT_STRINGSORT) - { - SetLastError(ERROR_INVALID_FLAGS); - goto map_string_exit; - } - - dstlenW = LCMapStringW(Locale, dwMapFlags, srcW, srclenW, NULL, 0); - if (!dstlenW) - goto map_string_exit; - - dstW = HeapAlloc(GetProcessHeap(), 0, dstlenW * sizeof(WCHAR)); - if (!dstW) - { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - goto map_string_exit; - } - - LCMapStringW(Locale, dwMapFlags, srcW, srclenW, dstW, dstlenW); - ret = WideCharToMultiByte(locale_cp, 0, dstW, dstlenW, lpDestStr, cchDest, NULL, NULL); - HeapFree(GetProcessHeap(), 0, dstW); - -map_string_exit: - if (srcW != bufW) HeapFree(GetProcessHeap(), 0, srcW); - return ret; -} - - -/* - * @implemented - */ -int -WINAPI -LCMapStringW ( - LCID Locale, - DWORD dwMapFlags, - LPCWSTR lpSrcStr, - int cchSrc, - LPWSTR lpDestStr, - int cchDest - ) -{ - LPWSTR dst_ptr; - - if (!lpSrcStr || !cchSrc || cchDest < 0) - { - SetLastError(ERROR_INVALID_PARAMETER); - return 0; - } - - /* mutually exclusive flags */ - if ((dwMapFlags & (LCMAP_LOWERCASE | LCMAP_UPPERCASE)) == (LCMAP_LOWERCASE | LCMAP_UPPERCASE) || - (dwMapFlags & (LCMAP_HIRAGANA | LCMAP_KATAKANA)) == (LCMAP_HIRAGANA | LCMAP_KATAKANA) || - (dwMapFlags & (LCMAP_HALFWIDTH | LCMAP_FULLWIDTH)) == (LCMAP_HALFWIDTH | LCMAP_FULLWIDTH) || - (dwMapFlags & (LCMAP_TRADITIONAL_CHINESE | LCMAP_SIMPLIFIED_CHINESE)) == (LCMAP_TRADITIONAL_CHINESE | LCMAP_SIMPLIFIED_CHINESE)) - { - SetLastError(ERROR_INVALID_FLAGS); - return 0; - } - - if (!cchDest) lpDestStr = NULL; - - Locale = ConvertDefaultLocale(Locale); - - if (dwMapFlags & LCMAP_SORTKEY) - { - INT ret; - if (lpSrcStr == lpDestStr) - { - SetLastError(ERROR_INVALID_FLAGS); - return 0; - } - - if (cchSrc < 0) cchSrc = wcslen(lpSrcStr); - - ret = wine_get_sortkey(dwMapFlags, lpSrcStr, cchSrc, (char *)lpDestStr, cchDest); - if (ret == 0) - SetLastError(ERROR_INSUFFICIENT_BUFFER); - return ret; - } - - /* SORT_STRINGSORT must be used exclusively with LCMAP_SORTKEY */ - if (dwMapFlags & SORT_STRINGSORT) - { - SetLastError(ERROR_INVALID_FLAGS); - return 0; - } - - if (cchSrc < 0) cchSrc = wcslen(lpSrcStr) + 1; - - if (!lpDestStr) /* return required string length */ - { - INT len; - - for (len = 0; cchSrc; lpSrcStr++, cchSrc--) - { - WCHAR wch = *lpSrcStr; - /* tests show that win2k just ignores NORM_IGNORENONSPACE, - * and skips white space and punctuation characters for - * NORM_IGNORESYMBOLS. - */ - if ((dwMapFlags & NORM_IGNORESYMBOLS) && (iswctype(wch, _SPACE | _PUNCT))) - continue; - len++; - } - return len; - } - - if (dwMapFlags & LCMAP_UPPERCASE) - { - for (dst_ptr = lpDestStr; cchSrc && cchDest; lpSrcStr++, cchSrc--) - { - WCHAR wch = *lpSrcStr; - if ((dwMapFlags & NORM_IGNORESYMBOLS) && (iswctype(wch, _SPACE | _PUNCT))) - continue; - *dst_ptr++ = towupper(wch); - cchDest--; - } - } - else if (dwMapFlags & LCMAP_LOWERCASE) - { - for (dst_ptr = lpDestStr; cchSrc && cchDest; lpSrcStr++, cchSrc--) - { - WCHAR wch = *lpSrcStr; - if ((dwMapFlags & NORM_IGNORESYMBOLS) && (iswctype(wch, _SPACE | _PUNCT))) - continue; - *dst_ptr++ = towlower(wch); - cchDest--; - } - } - else - { - if (lpSrcStr == lpDestStr) - { - SetLastError(ERROR_INVALID_FLAGS); - return 0; - } - for (dst_ptr = lpDestStr; cchSrc && cchDest; lpSrcStr++, cchSrc--) - { - WCHAR wch = *lpSrcStr; - if ((dwMapFlags & NORM_IGNORESYMBOLS) && (iswctype(wch, _SPACE | _PUNCT))) - continue; - *dst_ptr++ = wch; - cchDest--; - } - } - - if (cchSrc) - { - SetLastError(ERROR_INSUFFICIENT_BUFFER); - return 0; - } - - return dst_ptr - lpDestStr; -} - - -/* - * @unimplemented - */ -BOOL -WINAPI -SetCalendarInfoA( - LCID Locale, - CALID Calendar, - CALTYPE CalType, - LPCSTR lpCalData) -{ - if (!Locale || !lpCalData) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - switch (CalType) - { - case CAL_NOUSEROVERRIDE: - case CAL_RETURN_NUMBER: - case CAL_USE_CP_ACP: - break; - default: - SetLastError(ERROR_INVALID_FLAGS); - return FALSE; - } - - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/* - * @unimplemented - */ -BOOL -WINAPI -SetCalendarInfoW( - LCID Locale, - CALID Calendar, - CALTYPE CalType, - LPCWSTR lpCalData) -{ - if (!Locale || !lpCalData) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - switch (CalType) - { - case CAL_NOUSEROVERRIDE: - case CAL_RETURN_NUMBER: - case CAL_USE_CP_ACP: - break; - default: - SetLastError(ERROR_INVALID_FLAGS); - return FALSE; - } - - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - - -/********************************************************************** - * @implemented - * RIPPED FROM WINE's dlls\kernel\locale.c ver 0.9.29 - * - * SetLocaleInfoA (KERNEL32.@) - * - * Set the current locale info. - * - * PARAMS - * Locale [I] LCID of the locale - * LCType [I] LCTYPE_ flags from "winnls.h" - * lpLCData [I] Information to set - * - * RETURNS - * Success: TRUE. The information given will be returned by GetLocaleInfoA() - * whenever it is called without LOCALE_NOUSEROVERRIDE. - * Failure: FALSE. Use GetLastError() to determine the cause. - */ -BOOL -WINAPI -SetLocaleInfoA ( - LCID Locale, - LCTYPE LCType, - LPCSTR lpLCData - ) -{ - UINT codepage = CP_ACP; - WCHAR *strW; - DWORD len; - BOOL ret; - - if (!(LCType & LOCALE_USE_CP_ACP)) codepage = get_lcid_codepage( Locale ); - - if (!lpLCData) - { - SetLastError( ERROR_INVALID_PARAMETER ); - return FALSE; - } - len = MultiByteToWideChar( codepage, 0, lpLCData, -1, NULL, 0 ); - if (!(strW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) - { - SetLastError( ERROR_NOT_ENOUGH_MEMORY ); - return FALSE; - } - MultiByteToWideChar( codepage, 0, lpLCData, -1, strW, len ); - ret = SetLocaleInfoW( Locale, LCType, strW ); - HeapFree( GetProcessHeap(), 0, strW ); - return ret; -} - - -/********************************************************************** - * @implemented - * RIPPED FROM WINE's dlls\kernel\locale.c ver 0.9.29 - * - * SetLocaleInfoW (KERNEL32.@) - * - * See SetLocaleInfoA. - * - */ -BOOL -WINAPI -SetLocaleInfoW ( - LCID Locale, - LCTYPE LCType, - LPCWSTR lpLCData - ) -{ - const WCHAR *value; - UNICODE_STRING valueW; - NTSTATUS status; - HANDLE hkey; - - LCType &= 0xffff; - value = RosGetLocaleValueName( LCType ); - - if (!lpLCData || !value) - { - SetLastError( ERROR_INVALID_PARAMETER ); - return FALSE; - } - - if (LCType == LOCALE_IDATE || LCType == LOCALE_ILDATE) - { - SetLastError( ERROR_INVALID_FLAGS ); - return FALSE; - } - - if (!(hkey = RosCreateRegistryKey())) return FALSE; - RtlInitUnicodeString( &valueW, value ); - status = NtSetValueKey( hkey, &valueW, 0, REG_SZ, (PVOID)lpLCData, (lstrlenW(lpLCData)+1)*sizeof(WCHAR) ); - - if (LCType == LOCALE_SSHORTDATE || LCType == LOCALE_SLONGDATE) - { - /* Set I-value from S value */ - WCHAR *lpD, *lpM, *lpY; - WCHAR szBuff[2]; - - lpD = wcschr(lpLCData, 'd'); - lpM = wcschr(lpLCData, 'M'); - lpY = wcschr(lpLCData, 'y'); - - if (lpD <= lpM) - { - szBuff[0] = '1'; /* D-M-Y */ - } - else - { - if (lpY <= lpM) - szBuff[0] = '2'; /* Y-M-D */ - else - szBuff[0] = '0'; /* M-D-Y */ - } - - szBuff[1] = '\0'; - - if (LCType == LOCALE_SSHORTDATE) - LCType = LOCALE_IDATE; - else - LCType = LOCALE_ILDATE; - - value = RosGetLocaleValueName( LCType ); - - RtlInitUnicodeString( &valueW, value ); - status = NtSetValueKey( hkey, &valueW, 0, REG_SZ, szBuff, sizeof(szBuff) ); - } - - NtClose( hkey ); - - if (status) SetLastError( RtlNtStatusToDosError(status) ); - return !status; -} - - -/********************************************************************** - * @implemented - * RIPPED FROM WINE's dlls\kernel\locale.c rev 1.42 - * - * SetThreadLocale (KERNEL32.@) - * - * Set the current threads locale. - * - * PARAMS - * lcid [I] LCID of the locale to set - * - * RETURNS - * Success: TRUE. The threads locale is set to lcid. - * Failure: FALSE. Use GetLastError() to determine the cause. - * - */ -BOOL WINAPI SetThreadLocale( LCID lcid ) -{ - DPRINT("SetThreadLocale(0x%04lX)\n", lcid); - - lcid = ConvertDefaultLocale(lcid); - - if (lcid != GetThreadLocale()) - { - if (!IsValidLocale(lcid, LCID_SUPPORTED)) - { - SetLastError(ERROR_INVALID_PARAMETER); - return FALSE; - } - - NtCurrentTeb()->CurrentLocale = lcid; - /* FIXME: NtCurrentTeb()->code_page = get_lcid_codepage( lcid ); - * Wine save the acp for easy/fast access, but ROS has no such Teb member. - * Maybe add this member to ros as well? - */ - - /* - Lag test app for å se om locale etc, endres i en app. etter at prosessen er - startet, eller om bare nye prosesser blir berørt. - */ - } - return TRUE; -} - - -/* - * @implemented - */ -BOOL WINAPI -SetUserDefaultLCID(LCID lcid) -{ - NTSTATUS Status; - - Status = NtSetDefaultLocale(TRUE, lcid); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return 0; - } - return 1; -} - - -/* - * @implemented - */ -BOOL WINAPI -SetUserDefaultUILanguage(LANGID LangId) -{ - NTSTATUS Status; - - Status = NtSetDefaultUILanguage(LangId); - if (!NT_SUCCESS(Status)) - { - SetLastErrorByStatus(Status); - return 0; - } - return 1; -} - - -/* - * @implemented - */ -BOOL -WINAPI -SetUserGeoID( - GEOID GeoId) +BOOL WINAPI SetUserGeoID( GEOID GeoID ) { static const WCHAR geoW[] = {'G','e','o',0}; static const WCHAR nationW[] = {'N','a','t','i','o','n',0}; @@ -2947,49 +2595,112 @@ SetUserGeoID( return FALSE; } - swprintf(bufferW, formatW, GeoId); - NtSetValueKey(hkey, &keyW, 0, REG_SZ, bufferW, (wcslen(bufferW) + 1) * sizeof(WCHAR)); + sprintfW(bufferW, formatW, GeoID); + NtSetValueKey(hkey, &keyW, 0, REG_SZ, bufferW, (strlenW(bufferW) + 1) * sizeof(WCHAR)); NtClose(attr.RootDirectory); NtClose(hkey); return TRUE; } - -/* - * @implemented - */ -DWORD -WINAPI -VerLanguageNameA ( - DWORD wLang, - LPSTR szLang, - DWORD nSize - ) +typedef struct { - return GetLocaleInfoA( MAKELCID(wLang, SORT_DEFAULT), LOCALE_SENGLANGUAGE, szLang, nSize ); + union + { + UILANGUAGE_ENUMPROCA procA; + UILANGUAGE_ENUMPROCW procW; + } u; + DWORD flags; + LONG_PTR param; +} ENUM_UILANG_CALLBACK; + +static BOOL CALLBACK enum_uilang_proc_a( HMODULE hModule, LPCSTR type, + LPCSTR name, WORD LangID, LONG_PTR lParam ) +{ + ENUM_UILANG_CALLBACK *enum_uilang = (ENUM_UILANG_CALLBACK *)lParam; + char buf[20]; + + sprintf(buf, "%08x", (UINT)LangID); + return enum_uilang->u.procA( buf, enum_uilang->param ); } - -/* - * @implemented - */ -DWORD -WINAPI -VerLanguageNameW ( - DWORD wLang, - LPWSTR szLang, - DWORD nSize - ) +static BOOL CALLBACK enum_uilang_proc_w( HMODULE hModule, LPCWSTR type, + LPCWSTR name, WORD LangID, LONG_PTR lParam ) { - return GetLocaleInfoW( MAKELCID(wLang, SORT_DEFAULT), LOCALE_SENGLANGUAGE, szLang, nSize ); + static const WCHAR formatW[] = {'%','0','8','x',0}; + ENUM_UILANG_CALLBACK *enum_uilang = (ENUM_UILANG_CALLBACK *)lParam; + WCHAR buf[20]; + + sprintfW( buf, formatW, (UINT)LangID ); + return enum_uilang->u.procW( buf, enum_uilang->param ); } -/*********************************************************************** - * LCIDToLocaleName (KERNEL32.@) Wine 13.02.2009 +/****************************************************************************** + * EnumUILanguagesA (KERNEL32.@) */ -INT WINAPI LCIDToLocaleName( LCID lcid, LPWSTR name, INT count, DWORD flags ) +BOOL WINAPI EnumUILanguagesA(UILANGUAGE_ENUMPROCA pUILangEnumProc, DWORD dwFlags, LONG_PTR lParam) { - if (flags) DPRINT1( "unsupported flags %x\n", flags ); + ENUM_UILANG_CALLBACK enum_uilang; - return GetLocaleInfoW( lcid, LOCALE_SNAME | LOCALE_NOUSEROVERRIDE, name, count ); + TRACE("%p, %x, %lx\n", pUILangEnumProc, dwFlags, lParam); + + if(!pUILangEnumProc) { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if(dwFlags) { + SetLastError(ERROR_INVALID_FLAGS); + return FALSE; + } + + enum_uilang.u.procA = pUILangEnumProc; + enum_uilang.flags = dwFlags; + enum_uilang.param = lParam; + + EnumResourceLanguagesA( kernel32_handle, (LPCSTR)RT_STRING, + (LPCSTR)LOCALE_ILANGUAGE, enum_uilang_proc_a, + (LONG_PTR)&enum_uilang); + return TRUE; +} + +/****************************************************************************** + * EnumUILanguagesW (KERNEL32.@) + */ +BOOL WINAPI EnumUILanguagesW(UILANGUAGE_ENUMPROCW pUILangEnumProc, DWORD dwFlags, LONG_PTR lParam) +{ + ENUM_UILANG_CALLBACK enum_uilang; + + TRACE("%p, %x, %lx\n", pUILangEnumProc, dwFlags, lParam); + + + if(!pUILangEnumProc) { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + if(dwFlags) { + SetLastError(ERROR_INVALID_FLAGS); + return FALSE; + } + + enum_uilang.u.procW = pUILangEnumProc; + enum_uilang.flags = dwFlags; + enum_uilang.param = lParam; + + EnumResourceLanguagesW( kernel32_handle, (LPCWSTR)RT_STRING, + (LPCWSTR)LOCALE_ILANGUAGE, enum_uilang_proc_w, + (LONG_PTR)&enum_uilang); + return TRUE; +} + +INT WINAPI GetGeoInfoW(GEOID GeoId, GEOTYPE GeoType, LPWSTR lpGeoData, + int cchData, LANGID language) +{ + FIXME("%d %d %p %d %d\n", GeoId, GeoType, lpGeoData, cchData, language); + return 0; +} + +INT WINAPI GetGeoInfoA(GEOID GeoId, GEOTYPE GeoType, LPSTR lpGeoData, + int cchData, LANGID language) +{ + FIXME("%d %d %p %d %d\n", GeoId, GeoType, lpGeoData, cchData, language); + return 0; } diff --git a/reactos/dll/win32/kernel32/winnls/string/lcformat.c b/reactos/dll/win32/kernel32/winnls/string/lcformat.c index 663dec62819..12d753df429 100644 --- a/reactos/dll/win32/kernel32/winnls/string/lcformat.c +++ b/reactos/dll/win32/kernel32/winnls/string/lcformat.c @@ -3,7 +3,7 @@ * * Copyright 1995 Martin von Loewis * Copyright 1998 David Lee Lambert - * Copyright 2000 Julio César Gázquez + * Copyright 2000 Julio César G√°zquez * Copyright 2003 Jon Griffiths * Copyright 2005 Dmitry Timoshkov * @@ -22,17 +22,24 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -/* - * Whole file ripped from Wine's dlls\kernel\lcformat.c, rev 1.7 and is - * unchanged except that includes are different. I thought about adding - * @implemeted to each exported function, but this might make merging harder? - * -Gunnar - */ +//#include "config.h" +//#include "wine/port.h" -#include -#define NDEBUG -#include -DEBUG_CHANNEL(resource); +#include +#include +#include +#include + +#include "windef.h" +#include "winbase.h" +#include "wine/unicode.h" +#include "wine/debug.h" +#include "winternl.h" + +#define CRITICAL_SECTION RTL_CRITICAL_SECTION +#define CRITICAL_SECTION_DEBUG RTL_CRITICAL_SECTION_DEBUG + +WINE_DEFAULT_DEBUG_CHANNEL(nls); #define DATE_DATEVARSONLY 0x0100 /* only date stuff: yMdg */ #define TIME_TIMEVARSONLY 0x0200 /* only time stuff: hHmst */ @@ -77,15 +84,15 @@ typedef struct _NLS_FORMAT_NODE #define GetShortMonth(fmt,mth) fmt->lppszStrings[42 + mth] /* Write access to the cache is protected by this critical section */ -static RTL_CRITICAL_SECTION NLS_FormatsCS; -static RTL_CRITICAL_SECTION_DEBUG NLS_FormatsCS_debug = +static CRITICAL_SECTION NLS_FormatsCS; +static CRITICAL_SECTION_DEBUG NLS_FormatsCS_debug = { 0, 0, &NLS_FormatsCS, { &NLS_FormatsCS_debug.ProcessLocksList, &NLS_FormatsCS_debug.ProcessLocksList }, - 0, 0, 0, 0, 0 + 0, 0, 0 }; -static RTL_CRITICAL_SECTION NLS_FormatsCS = { &NLS_FormatsCS_debug, -1, 0, 0, 0, 0 }; +static CRITICAL_SECTION NLS_FormatsCS = { &NLS_FormatsCS_debug, -1, 0, 0, 0, 0 }; /************************************************************************** * NLS_GetLocaleNumber @@ -1044,10 +1051,8 @@ INT WINAPI GetNumberFormatW(LCID lcid, DWORD dwFlags, TRACE("(0x%04x,0x%08x,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_w(lpszValue), lpFormat, lpNumberStr, cchOut); - lcid = ConvertDefaultLocale(lcid); - if (!lpszValue || cchOut < 0 || (cchOut > 0 && !lpNumberStr) || - !IsValidLocale(lcid, LCID_INSTALLED) || + !IsValidLocale(lcid, 0) || (lpFormat && (dwFlags || !lpFormat->lpDecimalSep || !lpFormat->lpThousandSep))) { goto error; @@ -1417,10 +1422,8 @@ INT WINAPI GetCurrencyFormatW(LCID lcid, DWORD dwFlags, TRACE("(0x%04x,0x%08x,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_w(lpszValue), lpFormat, lpCurrencyStr, cchOut); - lcid = ConvertDefaultLocale(lcid); - if (!lpszValue || cchOut < 0 || (cchOut > 0 && !lpCurrencyStr) || - !IsValidLocale(lcid, LCID_INSTALLED) || + !IsValidLocale(lcid, 0) || (lpFormat && (dwFlags || !lpFormat->lpDecimalSep || !lpFormat->lpThousandSep || !lpFormat->lpCurrencySymbol || lpFormat->NegativeOrder > 15 || lpFormat->PositiveOrder > 3))) diff --git a/reactos/dll/win32/kernel32/winnls/string/nls.c b/reactos/dll/win32/kernel32/winnls/string/nls.c index 340ce2cfe30..c27290d04d8 100644 --- a/reactos/dll/win32/kernel32/winnls/string/nls.c +++ b/reactos/dll/win32/kernel32/winnls/string/nls.c @@ -1669,6 +1669,185 @@ static INT WideCharToUtf7(LPCWSTR pszWide, INT cchWide, LPSTR pszUtf7, INT cchUt return c; } +static BOOL +GetLocalisedText(DWORD dwResId, WCHAR *lpszDest) +{ + HRSRC hrsrc; + LCID lcid; + LANGID langId; + DWORD dwId; + + if (dwResId == 37) + dwId = dwResId * 100; + else + dwId = dwResId; + + lcid = GetUserDefaultLCID(); + lcid = ConvertDefaultLocale(lcid); + + langId = LANGIDFROMLCID(lcid); + + if (PRIMARYLANGID(langId) == LANG_NEUTRAL) + langId = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US); + + hrsrc = FindResourceExW(hCurrentModule, + (LPWSTR)RT_STRING, + MAKEINTRESOURCEW((dwId >> 4) + 1), + langId); + if (hrsrc) + { + HGLOBAL hmem = LoadResource(hCurrentModule, hrsrc); + + if (hmem) + { + const WCHAR *p; + unsigned int i; + + p = LockResource(hmem); + for (i = 0; i < (dwId & 0x0f); i++) p += *p + 1; + + memcpy(lpszDest, p + 1, *p * sizeof(WCHAR)); + lpszDest[*p] = '\0'; + + return TRUE; + } + } + + DPRINT1("Could not get codepage name. dwResId = %ld\n", dwResId); + return FALSE; +} + +/* + * @implemented + */ +BOOL +WINAPI +GetCPInfo(UINT CodePage, + LPCPINFO CodePageInfo) +{ + PCODEPAGE_ENTRY CodePageEntry; + + if (!CodePageInfo) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + CodePageEntry = IntGetCodePageEntry(CodePage); + if (CodePageEntry == NULL) + { + switch(CodePage) + { + case CP_UTF7: + case CP_UTF8: + CodePageInfo->DefaultChar[0] = 0x3f; + CodePageInfo->DefaultChar[1] = 0; + CodePageInfo->LeadByte[0] = CodePageInfo->LeadByte[1] = 0; + CodePageInfo->MaxCharSize = (CodePage == CP_UTF7) ? 5 : 4; + return TRUE; + } + + SetLastError( ERROR_INVALID_PARAMETER ); + return FALSE; + } + + if (CodePageEntry->CodePageTable.DefaultChar & 0xff00) + { + CodePageInfo->DefaultChar[0] = (CodePageEntry->CodePageTable.DefaultChar & 0xff00) >> 8; + CodePageInfo->DefaultChar[1] = CodePageEntry->CodePageTable.DefaultChar & 0x00ff; + } + else + { + CodePageInfo->DefaultChar[0] = CodePageEntry->CodePageTable.DefaultChar & 0xff; + CodePageInfo->DefaultChar[1] = 0; + } + + if ((CodePageInfo->MaxCharSize = CodePageEntry->CodePageTable.MaximumCharacterSize) == 2) + memcpy(CodePageInfo->LeadByte, CodePageEntry->CodePageTable.LeadByte, sizeof(CodePageInfo->LeadByte)); + else + CodePageInfo->LeadByte[0] = CodePageInfo->LeadByte[1] = 0; + + return TRUE; +} + +/* + * @implemented + */ +BOOL +WINAPI +GetCPInfoExW(UINT CodePage, + DWORD dwFlags, + LPCPINFOEXW lpCPInfoEx) +{ + if (!GetCPInfo(CodePage, (LPCPINFO) lpCPInfoEx)) + return FALSE; + + switch(CodePage) + { + case CP_UTF7: + { + lpCPInfoEx->CodePage = CP_UTF7; + lpCPInfoEx->UnicodeDefaultChar = 0x3f; + return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName); + } + break; + + case CP_UTF8: + { + lpCPInfoEx->CodePage = CP_UTF8; + lpCPInfoEx->UnicodeDefaultChar = 0x3f; + return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName); + } + + default: + { + PCODEPAGE_ENTRY CodePageEntry; + + CodePageEntry = IntGetCodePageEntry(CodePage); + if (CodePageEntry == NULL) + { + DPRINT1("Could not get CodePage Entry! CodePageEntry = 0\n"); + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + lpCPInfoEx->CodePage = CodePageEntry->CodePageTable.CodePage; + lpCPInfoEx->UnicodeDefaultChar = CodePageEntry->CodePageTable.UniDefaultChar; + return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName); + } + break; + } +} + + +/* + * @implemented + */ +BOOL +WINAPI +GetCPInfoExA(UINT CodePage, + DWORD dwFlags, + LPCPINFOEXA lpCPInfoEx) +{ + CPINFOEXW CPInfo; + + if (!GetCPInfoExW(CodePage, dwFlags, &CPInfo)) + return FALSE; + + /* the layout is the same except for CodePageName */ + memcpy(lpCPInfoEx, &CPInfo, sizeof(CPINFOEXA)); + + WideCharToMultiByte(CP_ACP, + 0, + CPInfo.CodePageName, + -1, + lpCPInfoEx->CodePageName, + sizeof(lpCPInfoEx->CodePageName), + NULL, + NULL); + return TRUE; +} + /** * @name WideCharToMultiByte * diff --git a/reactos/dll/win32/kernel32/winnls/string/sortkey.c b/reactos/dll/win32/kernel32/winnls/string/sortkey.c index 59a7bfad416..8f9bba5cd28 100644 --- a/reactos/dll/win32/kernel32/winnls/string/sortkey.c +++ b/reactos/dll/win32/kernel32/winnls/string/sortkey.c @@ -19,6 +19,7 @@ */ #include "wine/unicode.h" +#define get_char_typeW(x) iswctype((x) >> 8, (x) & 0xFF) extern int get_decomposition(WCHAR src, WCHAR *dst, unsigned int dstlen); extern const unsigned int collation_table[]; @@ -52,7 +53,7 @@ int wine_get_sortkey(int flags, const WCHAR *src, int srclen, char *dst, int dst * and skips white space and punctuation characters for * NORM_IGNORESYMBOLS. */ - if ((flags & NORM_IGNORESYMBOLS) && (iswctype(wch, _SPACE | _PUNCT))) + if ((flags & NORM_IGNORESYMBOLS) && (get_char_typeW(wch) & (C1_PUNCT | C1_SPACE))) continue; if (flags & NORM_IGNORECASE) wch = tolowerW(wch); @@ -110,7 +111,7 @@ int wine_get_sortkey(int flags, const WCHAR *src, int srclen, char *dst, int dst * and skips white space and punctuation characters for * NORM_IGNORESYMBOLS. */ - if ((flags & NORM_IGNORESYMBOLS) && (iswctype(wch, _SPACE | _PUNCT))) + if ((flags & NORM_IGNORESYMBOLS) && (get_char_typeW(wch) & (C1_PUNCT | C1_SPACE))) continue; if (flags & NORM_IGNORECASE) wch = tolowerW(wch); @@ -171,13 +172,13 @@ static inline int compare_unicode_weights(int flags, const WCHAR *str1, int len1 { int skip = 0; /* FIXME: not tested */ - if (iswctype(*str1, _SPACE | _PUNCT)) + if (get_char_typeW(*str1) & (C1_PUNCT | C1_SPACE)) { str1++; len1--; skip = 1; } - if (iswctype(*str2, _SPACE | _PUNCT)) + if (get_char_typeW(*str2) & (C1_PUNCT | C1_SPACE)) { str2++; len2--; @@ -242,13 +243,13 @@ static inline int compare_diacritic_weights(int flags, const WCHAR *str1, int le { int skip = 0; /* FIXME: not tested */ - if (iswctype(*str1, _SPACE | _PUNCT)) + if (get_char_typeW(*str1) & (C1_PUNCT | C1_SPACE)) { str1++; len1--; skip = 1; } - if (iswctype(*str2, _SPACE | _PUNCT)) + if (get_char_typeW(*str2) & (C1_PUNCT | C1_SPACE)) { str2++; len2--; @@ -291,13 +292,13 @@ static inline int compare_case_weights(int flags, const WCHAR *str1, int len1, { int skip = 0; /* FIXME: not tested */ - if (iswctype(*str1, _SPACE | _PUNCT)) + if (get_char_typeW(*str1) & (C1_PUNCT | C1_SPACE)) { str1++; len1--; skip = 1; } - if (iswctype(*str2, _SPACE | _PUNCT)) + if (get_char_typeW(*str2) & (C1_PUNCT | C1_SPACE)) { str2++; len2--;